You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I get the error {'message': "Only payloads with 'content-type' 'application/json' are supported."}
The headers of the request are 'Content-Type': 'multipart/form-data' which makes sense, given that the upload was for binary data. Should I be defining rebar differently? It seems to work if I completely get rid of the request_body_schema, since then it's not doing any validation. Swagger does support file type definitions, so there should be some way to define them within flask / rebar.
The text was updated successfully, but these errors were encountered:
What you would do in the case where you wanted to use a multipart/form-data, is not specify the request_body_schema, and validate it inside of the request instead.
I'm trying to figure out if there is currently support in rebar for doing a POST to upload a file / binary data?
I've been following flask's document for file uploads and created a simple rebar example.
We can then make a request to this API like
But I get the error
{'message': "Only payloads with 'content-type' 'application/json' are supported."}
The headers of the request are
'Content-Type': 'multipart/form-data'
which makes sense, given that the upload was for binary data. Should I be defining rebar differently? It seems to work if I completely get rid of therequest_body_schema
, since then it's not doing any validation. Swagger does support file type definitions, so there should be some way to define them within flask / rebar.The text was updated successfully, but these errors were encountered: