Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 2,031 for Content (0.21 sec)

  1. docs/zh/docs/advanced/custom-response.md

    ### `Response`
    
    其他全部的响应都继承自主类 `Response`。
    
    你可以直接返回它。
    
    `Response` 类接受如下参数:
    
    * `content` - 一个 `str` 或者 `bytes`。
    * `status_code` - 一个 `int` 类型的 HTTP 状态码。
    * `headers` - 一个由字符串组成的 `dict`。
    * `media_type` - 一个给出媒体类型的 `str`,比如 `"text/html"`。
    
    FastAPI(实际上是 Starlette)将自动包含 Content-Length 的头。它还将包含一个基于 media_type 的 Content-Type 头,并为文本类型附加一个字符集。
    
    
    ```Python hl_lines="1  18"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 7.8K bytes
    - Viewed (1)
  2. src/test/java/org/codelibs/curl/CurlTest.java

        @Test
        public void test_Get() {
            Curl.get("https://www.codelibs.org/").execute(response -> {
                final String content = response.getContentAsString();
                logger.info(content);
                assertTrue(content.length() > 0);
            }, e -> {
                logger.log(Level.SEVERE, "error", e);
                fail();
            });
        }
    
        /*
        @Test
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 2.5K bytes
    - Viewed (1)
  3. docs_src/request_files/tutorial002.py

    <input name="files" type="file" multiple>
    <input type="submit">
    </form>
    </body>
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 811 bytes
    - Viewed (0)
  4. docs_src/request_files/tutorial002_an_py39.py

    <input name="files" type="file" multiple>
    <input type="submit">
    </form>
    </body>
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 826 bytes
    - Viewed (0)
  5. cmd/object-api-utils_test.go

    	}{
    		{
    			name:     "1",
    			metadata: map[string]string{"content-type": "application/octet-stream", "etag": "de75a98baf2c6aef435b57dd0fc33c86", "x-amz-storage-class": "STANDARD"},
    			want:     map[string]string{"content-type": "application/octet-stream", "etag": "de75a98baf2c6aef435b57dd0fc33c86"},
    		},
    		{
    			name:     "2",
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 23.4K bytes
    - Viewed (0)
  6. tensorflow/c/eager/parallel_device/parallel_device.cc

        }
        std::vector<MaybeParallelTensorOwned> result_content;
        result_content.reserve(1);
        result_content.push_back(ParallelTensor::FromTensorHandles(
            parallel_device, std::move(components), status));
        if (TF_GetCode(status) != TF_OK) return result;
        result.emplace(std::move(result_content));
        return result;
      } else if (operation_name == std::string("TPUReplicatedOutput")) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Mar 29 22:05:31 GMT 2023
    - 18.3K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/custom-response.md

    You can return it directly.
    
    It accepts the following parameters:
    
    * `content` - A `str` or `bytes`.
    * `status_code` - An `int` HTTP status code.
    * `headers` - A `dict` of strings.
    * `media_type` - A `str` giving the media type. E.g. `"text/html"`.
    
    FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the media_type and appending a charset for text types.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  8. maven-core/src/main/java/org/apache/maven/internal/impl/DefaultModelXmlFactory.java

                if (writer != null) {
                    new MavenStaxWriter().write(writer, content);
                } else if (outputStream != null) {
                    new MavenStaxWriter().write(outputStream, content);
                } else {
                    try (OutputStream os = Files.newOutputStream(path)) {
                        new MavenStaxWriter().write(outputStream, content);
                    }
                }
            } catch (Exception e) {
    Java
    - Registered: Sun Mar 24 03:35:10 GMT 2024
    - Last Modified: Thu Dec 07 20:05:02 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  9. maven-api-impl/src/main/java/org/apache/maven/internal/impl/DefaultModelXmlFactory.java

                if (writer != null) {
                    new MavenStaxWriter().write(writer, content);
                } else if (outputStream != null) {
                    new MavenStaxWriter().write(outputStream, content);
                } else {
                    try (OutputStream os = Files.newOutputStream(path)) {
                        new MavenStaxWriter().write(outputStream, content);
                    }
                }
            } catch (Exception e) {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  10. docs_src/request_files/tutorial003_an.py

    <input name="files" type="file" multiple>
    <input type="submit">
    </form>
    </body>
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 987 bytes
    - Viewed (0)
Back to top