Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 213 for response_mode (0.08 seconds)

  1. tests/test_datetime_custom_encoder.py

                return dt_field.replace(microsecond=0, tzinfo=timezone.utc).isoformat()
    
        app = FastAPI()
        model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8))
    
        @app.get("/model", response_model=ModelWithDatetimeField)
        def get_model():
            return model
    
        client = TestClient(app)
        with client:
            response = client.get("/model")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 817 bytes
    - Click Count (0)
  2. docs/fr/docs/advanced/additional-responses.md

    ///
    
    ## Combinaison d'informations
    
    Vous pouvez également combiner des informations de réponse provenant de plusieurs endroits, y compris les paramètres `response_model`, `status_code` et `responses`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Nov 09 16:39:20 GMT 2024
    - 9.5K bytes
    - Click Count (0)
  3. docs_src/extra_models/tutorial005_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/keyword-weights/", response_model=dict[str, float])
    async def read_keyword_weights():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 180 bytes
    - Click Count (0)
  4. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

        buf.readShort() // query id
    
        val flags = buf.readShort().toInt() and 0xffff
        require(flags shr 15 != 0) { "not a response" }
    
        val responseCode = flags and 0xf
    
        if (responseCode == NXDOMAIN) {
          throw UnknownHostException("$hostname: NXDOMAIN")
        } else if (responseCode == SERVFAIL) {
          throw UnknownHostException("$hostname: SERVFAIL")
        }
    
        val questionCount = buf.readShort().toInt() and 0xffff
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  5. docs/de/docs/advanced/response-headers.md

    Und wenn Sie ein `response_model` deklariert haben, wird es weiterhin zum Filtern und Konvertieren des von Ihnen zurückgegebenen Objekts verwendet.
    
    **FastAPI** verwendet diese *vorübergehende* Response, um die Header (auch Cookies und Statuscode) zu extrahieren und fügt diese in die endgültige Response ein, die den von Ihnen zurückgegebenen Wert enthält, gefiltert nach einem beliebigen `response_model`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 2.8K bytes
    - Click Count (2)
  6. docs/en/docs/advanced/response-headers.md

    And if you declared a `response_model`, it will still be used to filter and convert the object you returned.
    
    **FastAPI** will use that *temporal* response to extract the headers (also cookies and status code), and will put them in the final response that contains the value you returned, filtered by any `response_model`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 2.3K bytes
    - Click Count (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        if (HttpMethod.permitsRequestBody(method)) {
          val responseCode = userResponse.code
          val maintainBody =
            HttpMethod.redirectsWithBody(method) ||
              responseCode == HTTP_PERM_REDIRECT ||
              responseCode == HTTP_TEMP_REDIRECT
          if (HttpMethod.redirectsToGet(method) && responseCode != HTTP_PERM_REDIRECT && responseCode != HTTP_TEMP_REDIRECT) {
            requestBuilder.method("GET", null)
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue May 27 14:58:02 GMT 2025
    - 12.4K bytes
    - Click Count (0)
  8. tests/test_schema_ref_pydantic_v2.py

        class ModelWithRef(BaseModel):
            ref: str = Field(validation_alias="$ref", serialization_alias="$ref")
            model_config = ConfigDict(validate_by_alias=True, serialize_by_alias=True)
    
        @app.get("/", response_model=ModelWithRef)
        async def read_root() -> Any:
            return {"$ref": "some-ref"}
    
        client = TestClient(app)
        return client
    
    
    def test_get(client: TestClient):
        response = client.get("/")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  9. docs_src/path_operation_configuration/tutorial001_py310.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
    
    
    @app.post("/items/", response_model=Item, status_code=status.HTTP_201_CREATED)
    async def create_item(item: Item):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 363 bytes
    - Click Count (0)
  10. docs_src/response_model/tutorial003_05_py39.py

    from typing import Union
    
    from fastapi import FastAPI, Response
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/portal", response_model=None)
    async def get_portal(teleport: bool = False) -> Union[Response, dict]:
        if teleport:
            return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 405 bytes
    - Click Count (0)
Back to Top