Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 365 for Content (0.25 sec)

  1. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

        val expected =
          """
          |--AaB03x
          |Content-Disposition: form-data; name="submit-name"
          |
          |Larry
          |--AaB03x
          |Content-Disposition: form-data; name="files"
          |Content-Type: multipart/mixed; boundary=BbC04y
          |
          |--BbC04y
          |Content-Disposition: file; filename="file1.txt"
          |Content-Type: text/plain; charset=utf-8
          |
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

          message = "Moved to extension function. Put the 'content' argument first to fix Java",
          replaceWith =
            ReplaceWith(
              expression = "content.toResponseBody(contentType)",
              imports = ["okhttp3.ResponseBody.Companion.toResponseBody"],
            ),
          level = DeprecationLevel.WARNING,
        )
        fun create(
          contentType: MediaType?,
          content: String,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  3. 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)
  4. docs/logging/README.md

        "Content-Length": "380",
        "Content-Type": "application/octet-stream",
        "User-Agent": "MinIO (linux; amd64) minio-go/v7.0.15 mc/DEVELOPMENT.2021-10-06T23-39-34Z",
        "X-Amz-Content-Sha256": "STREAMING-AWS4-HMAC-SHA256-PAYLOAD",
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 15 23:04:20 GMT 2023
    - 9.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

        }
    
        /**
         * Returns true if [fieldName] is content specific and therefore should always be used
         * from cached headers.
         */
        private fun isContentSpecificHeader(fieldName: String): Boolean {
          return "Content-Length".equals(fieldName, ignoreCase = true) ||
            "Content-Encoding".equals(fieldName, ignoreCase = true) ||
            "Content-Type".equals(fieldName, ignoreCase = true)
        }
      }
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  6. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        response.body.close()
        applicationLogs
          .assertLogEqual("--> POST $url")
          .assertLogEqual("Content-Type: text/plain; charset=utf-8")
          .assertLogEqual("Content-Length: 3")
          .assertLogEqual("--> END POST")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms\)"""))
          .assertLogEqual("Content-Length: 0")
          .assertLogEqual("<-- END HTTP")
          .assertNoMoreLogs()
        networkLogs
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            )
            assertThat(networkRequest.header("Accept-Encoding")).isNotNull()
    
            // The network response also has everything, including the raw gzipped content.
            val networkResponse = chain.proceed(networkRequest)
            assertThat(networkResponse.header("Content-Encoding")).isEqualTo("gzip")
            networkResponse
          }
        client =
          client.newBuilder()
            .addNetworkInterceptor(interceptor)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

           *
           * Example:
           * ```
           * --> POST /greeting http/1.1
           * Host: example.com
           * Content-Type: plain/text
           * Content-Length: 3
           * --> END POST
           *
           * <-- 200 OK (22ms)
           * Content-Type: plain/text
           * Content-Length: 6
           * <-- END HTTP
           * ```
           */
          HEADERS,
    
          /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

    class MultipartReaderTest {
      @Test fun `parse multipart`() {
        val multipart =
          """
          |--simple boundary
          |Content-Type: text/plain; charset=utf-8
          |Content-ID: abc
          |
          |abcd
          |efgh
          |--simple boundary
          |Content-Type: text/plain; charset=utf-8
          |Content-ID: ijk
          |
          |ijkl
          |mnop
          |
          |--simple boundary--
          """.trimMargin()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

          @JvmStatic
          fun create(
            headers: Headers?,
            body: RequestBody,
          ): Part {
            require(headers?.get("Content-Type") == null) { "Unexpected header: Content-Type" }
            require(headers?.get("Content-Length") == null) { "Unexpected header: Content-Length" }
            return Part(headers, body)
          }
    
          @JvmStatic
          fun createFormData(
            name: String,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
Back to top