Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 587 for body (0.14 sec)

  1. docs/ko/docs/tutorial/body-multiple-params.md

    ## 본문 내의 단일 값
    
    쿼리 및 경로 매개변수에 대한 추가 데이터를 정의하는 `Query`와 `Path`와 같이, **FastAPI**는 동등한 `Body`를 제공합니다.
    
    예를 들어 이전의 모델을 확장하면, `item`과 `user`와 동일한 본문에 또 다른 `importance`라는 키를 갖도록 할 수있습니다.
    
    단일 값을 그대로 선언한다면, **FastAPI**는 쿼리 매개변수로 가정할 것입니다.
    
    하지만, **FastAPI**의 `Body`를 사용해 다른 본문 키로 처리하도록 제어할 수 있습니다:
    
    
    ```Python hl_lines="23"
    {!../../../docs_src/body_multiple_params/tutorial003.py!}
    ```
    
    이 경우에는 **FastAPI**는 본문을 이와 같이 예측할 것입니다:
    
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Feb 11 13:48:31 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  2. docs/ja/docs/tutorial/body-nested-models.md

    ```Python hl_lines="12"
    {!../../../docs_src/body_nested_models/tutorial001.py!}
    ```
    
    これにより、各項目の型は宣言されていませんが、`tags`はある項目のリストになります。
    
    ## タイプパラメータを持つリストのフィールド
    
    しかし、Pythonには型や「タイプパラメータ」を使ってリストを宣言する方法があります:
    
    ### typingの`List`をインポート
    
    まず、Pythonの標準の`typing`モジュールから`List`をインポートします:
    
    ```Python hl_lines="1"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### タイプパラメータを持つ`List`の宣言
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/body-multiple-params.md

    ```Python
    item: Item = Body(embed=True)
    ```
    
    como em:
    
    === "Python 3.10+"
    
        ```Python hl_lines="15"
        {!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="17"
        {!> ../../../docs_src/body_multiple_params/tutorial005.py!}
        ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/body-nested-models.md

    ### Defina um sub-modelo
    
    Por exemplo, nós podemos definir um modelo `Image`:
    
    ```Python hl_lines="9-11"
    {!../../../docs_src/body_nested_models/tutorial004.py!}
    ```
    
    ### Use o sub-modelo como um tipo
    
    E então podemos usa-lo como o tipo de um atributo:
    
    ```Python hl_lines="20"
    {!../../../docs_src/body_nested_models/tutorial004.py!}
    ```
    
    Isso significa que o **FastAPI** vai esperar um corpo similar à:
    
    ```JSON
    {
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  5. tests/test_multi_body_errors.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        age: condecimal(gt=Decimal(0.0))  # type: ignore
    
    
    @app.post("/items/")
    def save_item_no_body(item: List[Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    def test_put_correct_body():
        response = client.post("/items/", json=[{"name": "Foo", "age": 5}])
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  6. tests/test_regex_deprecated_body.py

                                                {
                                                    "$ref": "#/components/schemas/Body_read_items_items__post"
                                                }
                                            ],
                                            "title": "Body",
                                        }
                                    )
                                    | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        val response2 = client.newCall(request).execute()
        response1.body.string() // Discard the response body.
        response2.body.string() // Discard the response body.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(1)
      }
    
      @Test
      fun connectionsAreEvicted() {
        server.enqueue(MockResponse(body = "a"))
        server.enqueue(MockResponse(body = "b"))
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/app/web/api/admin/dict/protwords/ApiAdminDictProtwordsAction.java

        public JsonResponse<ApiResult> get$settings(final String dictId, final SearchBody body) {
            body.dictId = dictId;
            validateApi(body, messages -> {});
            final ProtwordsPager pager = copyBeanToNewBean(body, ProtwordsPager.class);
            return asJson(new ApiResult.ApiConfigsResponse<EditBody>()
                    .settings(protwordsService.getProtwordsList(body.dictId, pager).stream()
    Java
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/ResponseBodyTest.kt

            }
          }
        assertThat(body.source().readUtf8()).isEqualTo("hello")
        body.close()
      }
    
      @Test
      fun unicodeText() {
        val text = "eile oli oliiviõli"
        val body = text.toResponseBody()
        assertThat(body.string()).isEqualTo(text)
      }
    
      @Test
      fun unicodeTextWithCharset() {
        val text = "eile oli oliiviõli"
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4K bytes
    - Viewed (0)
  10. okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt

        val request = fromArgs("-d", "foo", "http://example.com").createRequest()
        val body = request.body
        assertThat(request.method).isEqualTo("POST")
        assertThat(request.url.toString()).isEqualTo("http://example.com/")
        assertThat(body!!.contentType().toString()).isEqualTo(
          "application/x-www-form-urlencoded; charset=utf-8",
        )
        assertThat(bodyAsString(body)).isEqualTo("foo")
      }
    
      @Test
      fun dataPut() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
Back to top