Skip to content

Accept request body of "application/octet-stream" type? #3038

Answered by Alc-Alc
hongquan asked this question in Q&A
Discussion options

You must be logged in to vote

to add to this, you can directly have body injected as mentioned here https://docs.litestar.dev/latest/usage/routing/handlers.html#reserved-keyword-arguments

async def flash_firmware(body: bytes) -> FirmwareUploadResponse:
    body

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Alc-Alc
Comment options

Answer selected by hongquan
@provinzkraut
Comment options

@hongquan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants