コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 2 of about 2 for shampoo (0.001 sec.)
レスポンスを直接返す 11228
レスポンスを直接返す FastAPI の path operation では、通常は任意のデータを返すことができます: 例えば、 dict 、 list 、Pydanticモデル、データベースモデルなどです。 デフォルトでは、 FastAPI は JSON互換エンコーダ で説明されている jsonable_encod ... ort FastAPI , Response app = FastAPI () @app . get ( "/legacy/" ) def get_legacy_data (): data = """<?xml version="1.0"?> <shampoo> <Header> Apply shampoo here. </Header> <Body> You'll have to use soap here. </Body> </shampoo> """ return Response ( cont ...
https://man.mtool.work/fastapi/0.115/advanced/response-directly/
カスタムレスポンス - HTML、ストリーム、ファイル、その他のレスポンス 7485
カスタムレスポンス - HTML、ストリーム、ファイル、その他のレスポンス デフォルトでは、 FastAPI は JSONResponse を使ってレスポンスを返します。 レスポンスを直接返す で見たように、 Response を直接返すことでこの挙動をオーバーライドできます。 しか ... ort FastAPI , Response app = FastAPI () @app . get ( "/legacy/" ) def get_legacy_data (): data = """<?xml version="1.0"?> <shampoo> <Header> Apply shampoo here. </Header> <Body> You'll have to use soap here. </Body> </shampoo> """ return Response ( cont ...
https://man.mtool.work/fastapi/0.115/advanced/custom-response/
PREV 1 NEXT