Sample Usage
@app.get("/binary_output_response_sync")
def binary_output_response_sync(request):
return Response(
status_code=200,
headers={"Content-Type": "application/octet-stream"},
body="OK",
)
@app.get("/binary_output_async")
async def binary_output_async(request):
return b"OK"
@app.get("/binary_output_response_async")
async def binary_output_response_async(request):
return Response(
status_code=200,
headers={"Content-Type": "application/octet-stream"},
body="OK",
)
What's Changed
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #384
- small correction in docs by @tkanhe in #387
- test: organize and add tests by @AntoineRR in #377
- ci: build artifacts on every push and pull by @sansyrox in #378
- chore: fix requirements files and update packages by @AntoineRR in #389
- Changed Response to use body: bytes by @madhavajay in #375
- docs: add documentation regarding byte response by @sansyrox in #392
New Contributors
- @tkanhe made their first contribution in #387
- @madhavajay made their first contribution in #375
Full Changelog: v0.23.1...v0.24.0