Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 38 for 201 (0.12 sec)

  1. docs/en/docs/advanced/additional-status-codes.md

    But you also want it to accept new items. And when the items didn't exist before, it creates them, and returns an HTTP status code of 201 "Created".
    
    To achieve that, import `JSONResponse`, and return your content there directly, setting the `status_code` that you want:
    
    === "Python 3.10+"
    
        ```Python hl_lines="4  25"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/response-change-status-code.md

    你可能之前已经了解到,你可以设置默认的[响应状态码](../tutorial/response-status-code.md){.internal-link target=_blank}。
    
    但在某些情况下,你需要返回一个不同于默认值的状态码。
    
    ## 使用场景
    
    例如,假设你想默认返回一个HTTP状态码为“OK”`200`。
    
    但如果数据不存在,你想创建它,并返回一个HTTP状态码为“CREATED”`201`。
    
    但你仍然希望能够使用`response_model`过滤和转换你返回的数据。
    
    对于这些情况,你可以使用一个`Response`参数。
    
    ## 使用 `Response` 参数
    
    你可以在你的*路径操作函数*中声明一个`Response`类型的参数(就像你可以为cookies和头部做的那样)。
    
    然后你可以在这个*临时*响应对象中设置`status_code`。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jun 10 20:30:28 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  3. docs/es/docs/advanced/additional-status-codes.md

    Pero también quieres que acepte nuevos ítems. Cuando los ítems no existan anteriormente, serán creados y devolverá un código de estado HTTP 201 "Created".
    
    Para conseguir esto importa `JSONResponse` y devuelve ahí directamente tu contenido, asignando el `status_code` que quieras:
    
    ```Python hl_lines="4  25"
    {!../../../docs_src/additional_status_codes/tutorial001.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 13 11:57:27 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  4. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        derWriter.write("test", tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = 30L) {
          derWriter.writeUtf8("a".repeat(201))
        }
    
        assertThat(buffer.readByteString(3)).isEqualTo("1e81c9".decodeHex())
        assertThat(buffer.readUtf8()).isEqualTo("a".repeat(201))
      }
    
      @Test fun `decode primitive bit string`() {
        val buffer =
          Buffer()
            .write("0307040A3B5F291CD0".decodeHex())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/response-status-code.md

    つまり:
    
    * `100`以上は「情報」のためのものです。。直接使うことはほとんどありません。これらのステータスコードを持つレスポンスはボディを持つことができません。
    * **`200`** 以上は「成功」のレスポンスのためのものです。これらは最も利用するであろうものです。
        * `200`はデフォルトのステータスコードで、すべてが「OK」であったことを意味します。
        * 別の例としては、`201`(Created)があります。これはデータベースに新しいレコードを作成した後によく使用されます。
        * 特殊なケースとして、`204`(No Content)があります。このレスポンスはクライアントに返すコンテンツがない場合に使用されます。そしてこのレスポンスはボディを持つことはできません。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 15:42:08 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  6. .teamcity/performance-test-durations.json

      "durations" : [ {
        "testProject" : "excludeRuleMergingBuild",
        "linux" : 201
      } ]
    }, {
      "scenario" : "org.gradle.performance.regression.corefeature.LargeDependencyGraphPerformanceTest.resolve large dependency graph (parallel = true, locking = false)",
      "durations" : [ {
    Json
    - Registered: Wed May 08 11:36:15 GMT 2024
    - Last Modified: Mon Feb 19 11:22:56 GMT 2024
    - 26.3K bytes
    - Viewed (1)
  7. tests/test_application.py

        assert "redoc@next" in response.text
    
    
    def test_enum_status_code_response():
        response = client.get("/enum-status-code")
        assert response.status_code == 201, response.text
        assert response.json() == "foo bar"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 52.2K bytes
    - Viewed (0)
  8. src/main/config/openapi/openapi-user.yaml

              in: query
              description: Query ID where the document is contained
              required: true
              schema:
                type: string
                example: queryid
          responses:
            '201':
              description: Successful operation
              content:
                application/json:
                  schema:
                    type: object
                    properties:
                      result:
    Others
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Mon Jun 19 13:30:00 GMT 2023
    - 21.6K bytes
    - Viewed (1)
  9. cmd/apierrorcode_string.go

    	_ = x[ErrAdminConfigInvalidIDPType-197]
    	_ = x[ErrAdminConfigLDAPNonDefaultConfigName-198]
    	_ = x[ErrAdminConfigLDAPValidation-199]
    	_ = x[ErrAdminConfigIDPCfgNameAlreadyExists-200]
    	_ = x[ErrAdminConfigIDPCfgNameDoesNotExist-201]
    	_ = x[ErrInsecureClientRequest-202]
    	_ = x[ErrObjectTampered-203]
    	_ = x[ErrAdminLDAPNotEnabled-204]
    	_ = x[ErrSiteReplicationInvalidRequest-205]
    	_ = x[ErrSiteReplicationPeerResp-206]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  10. cmd/api-response.go

    	// Collection of errors deleting certain objects.
    	Errors []DeleteError `xml:"Error,omitempty"`
    }
    
    // PostResponse container for POST object request when success_action_status is set to 201
    type PostResponse struct {
    	Bucket   string
    	Key      string
    	ETag     string
    	Location string
    }
    
    // returns "https" if the tls boolean is true, "http" otherwise.
    func getURLScheme(tls bool) string {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 33.3K bytes
    - Viewed (2)
Back to top