Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 668 for _body (0.02 sec)

  1. docs_src/custom_request_and_route/tutorial001_an_py39.py

    from fastapi import Body, FastAPI, Request, Response
    from fastapi.routing import APIRoute
    
    
    class GzipRequest(Request):
        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
                self._body = body
            return self._body
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 988 bytes
    - Viewed (0)
  2. docs_src/custom_request_and_route/tutorial001_py310.py

    from fastapi import Body, FastAPI, Request, Response
    from fastapi.routing import APIRoute
    
    
    class GzipRequest(Request):
        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
                self._body = body
            return self._body
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 976 bytes
    - Viewed (0)
  3. docs_src/custom_request_and_route/tutorial001_py39.py

    from fastapi import Body, FastAPI, Request, Response
    from fastapi.routing import APIRoute
    
    
    class GzipRequest(Request):
        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
                self._body = body
            return self._body
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 967 bytes
    - Viewed (0)
  4. docs_src/custom_request_and_route/tutorial001_an_py310.py

    from typing import Annotated
    
    from fastapi import Body, FastAPI, Request, Response
    from fastapi.routing import APIRoute
    
    
    class GzipRequest(Request):
        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
                self._body = body
            return self._body
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 1015 bytes
    - Viewed (0)
  5. docs/es/docs/tutorial/body.md

    # Request Body { #request-body }
    
    Cuando necesitas enviar datos desde un cliente (digamos, un navegador) a tu API, los envías como un **request body**.
    
    Un **request** body es un dato enviado por el cliente a tu API. Un **response** body es el dato que tu API envía al cliente.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/body.md

    ///
    
    ## Ohne Pydantic { #without-pydantic }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/body.md

    ///
    
    ## Sem o Pydantic { #without-pydantic }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/body.md

    # Request Body { #request-body }
    
    When you need to send data from a client (let's say, a browser) to your API, you send it as a **request body**.
    
    A **request** body is data sent by the client to your API. A **response** body is the data your API sends to the client.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/body-fields.md

    # Corpo - Campos { #body-fields }
    
    Da mesma forma que você pode declarar validações adicionais e metadados nos parâmetros de uma *função de operação de rota* com `Query`, `Path` e `Body`, você pode declarar validações e metadados dentro de modelos do Pydantic usando `Field` do Pydantic.
    
    ## Importe `Field` { #import-field }
    
    Primeiro, você tem que importá-lo:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *}
    
    /// warning | Atenção
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/body.md

    <img src="/img/tutorial/body/image01.png">
    
    そして、それらが使われる *パスオペレーション* のそれぞれのAPIドキュメントにも表示されます:
    
    <img src="/img/tutorial/body/image02.png">
    
    ## エディターサポート
    
    エディターによる型ヒントと補完が関数内で利用できます (Pydanticモデルではなく `dict` を受け取ると、同じサポートは受けられません):
    
    <img src="/img/tutorial/body/image03.png">
    
    型によるエラーチェックも可能です:
    
    <img src="/img/tutorial/body/image04.png">
    
    これは偶然ではなく、このデザインに基づいてフレームワークが作られています。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Jul 26 10:48:11 UTC 2025
    - 7.8K bytes
    - Viewed (0)
Back to top