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
Hey, so we would like to consume the raw request, but it seems it's not possible. The reason for doing this is the body contains binary data we need to consume as is.
The text was updated successfully, but these errors were encountered:
Could you provide some minimal examples? What's your request data look like? If it's not related to OpenAPI generation, you may need to request this feature in Flask itself.
Could you provide some minimal examples? What's your request data look like? If it's not related to OpenAPI generation, you may need to request this feature in Flask itself.
Yes so the request will look like this:
POST /upload
Content-Type: image.jpeg
Body: <image data>
We can grab the reqeust data from flask like so:
from flask import request
from apiflask import App
app = App()
@app.post('/upload')
def upload():
request.body # Do something with the body
The issue is there isn't anyway to tell APIFlask to emit a spec which indicates the endpoint accepts binary data as the body nor does there seem to be a way override manually the generated spec via the api.doc decorator when we need to bypass the default behaviour beyond a global app level decorator which is a bit more complicated to do.
Hey, so we would like to consume the raw request, but it seems it's not possible. The reason for doing this is the body contains binary data we need to consume as is.
The text was updated successfully, but these errors were encountered: