Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Magic (0.15 sec)

  1. docs_src/path_operation_advanced_configuration/tutorial006.py

    from fastapi import FastAPI, Request
    
    app = FastAPI()
    
    
    def magic_data_reader(raw_body: bytes):
        return {
            "size": len(raw_body),
            "content": {
                "name": "Maaaagic",
                "price": 42,
                "description": "Just kiddin', no magic here. ✨",
            },
        }
    
    
    @app.post(
        "/items/",
        openapi_extra={
            "requestBody": {
                "content": {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 29 20:01:13 GMT 2021
    - 1K bytes
    - Viewed (0)
Back to top