Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 110 for Content (0.17 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/Headers.kt

       * according to this method:
       *
       * 1. Original
       * ```
       * Content-Type: text/html
       * Content-Length: 50
       * ```
       *
       * 2. Different order
       *
       * ```
       * Content-Length: 50
       * Content-Type: text/html
       * ```
       *
       * 3. Different case
       *
       * ```
       * content-type: text/html
       * content-length: 50
       * ```
       *
       * 4. Different values
       *
       * ```
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CallTest.kt

          .assertHeader("Content-Encoding")
          .assertHeader("Content-Length")
          .assertBody("abcabcabc")
    
        // But the network request doesn't lie. OkHttp used gzip for this call.
        userResponse.networkResponse()
          .assertHeader("Content-Encoding", "gzip")
          .assertHeader("Content-Length", bodySize)
          .assertRequestHeader("Accept-Encoding", "gzip")
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  4. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

     */
    @RunWith(AndroidJUnit4::class)
    @SdkSuppress(minSdkVersion = 34)
    class AndroidHttpEngineTest {
      val context = InstrumentationRegistry.getInstrumentation().context
    
      val cacheDir =
        context.cacheDir.resolve("httpEngine").also {
          it.mkdirs()
        }
      val engine =
        HttpEngine.Builder(context)
          .setEnableBrotli(true)
          .setStoragePath(cacheDir.path)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          this.status = "HTTP/1.1 200 OK"
          this.bodyVar = null
          this.streamHandlerVar = null
          this.webSocketListenerVar = null
          this.headers =
            Headers.Builder()
              .add("Content-Length", "0")
          this.trailers = Headers.Builder()
          this.throttleBytesPerPeriod = Long.MAX_VALUE
          this.throttlePeriodNanos = 0L
          this.socketPolicy = KeepOpen
          this.bodyDelayNanos = 0L
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  6. 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)
  7. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt

      @Test
      fun processResponse() {
        server.enqueue(
          MockResponse.Builder()
            .body(
              """
              |data: hey
              |
              |
              """.trimMargin(),
            ).setHeader("content-type", "text/event-stream")
            .build(),
        )
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val response = client.newCall(request).execute()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/Cache.kt

         * HTTP/1.1 200 OK
         * 3
         * Content-Type: image/png
         * Content-Length: 100
         * Cache-Control: max-age=600
         * ```
         *
         * A typical HTTPS file looks like this:
         *
         * ```
         * https://google.com/foo
         * GET
         * 2
         * Accept-Language: fr-CA
         * Accept-Charset: UTF-8
         * HTTP/1.1 200 OK
         * 3
         * Content-Type: image/png
         * Content-Length: 100
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  9. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

          assertThat(headersToList(response)).containsExactly("Content-Length: 0")
        }
      }
    
      @Test
      fun setStatusControlsWholeStatusLine() {
        val response = MockResponse().setStatus("HTTP/1.1 202 That'll do pig")
        assertThat(headersToList(response)).containsExactly("Content-Length: 0")
        assertThat(response.status).isEqualTo("HTTP/1.1 202 That'll do pig")
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  10. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

            val parts = header.split(':', limit = 2)
            if ("Content-Type".equals(parts[0], ignoreCase = true)) {
              return@let parts[1].trim()
            }
          }
          return@let null
        } ?: "application/x-www-form-urlencoded"
    
      return mimeType.toMediaTypeOrNull()
    }
    
    private fun isSpecialHeader(s: String): Boolean {
      return s.equals("Content-Type", ignoreCase = true)
    }
    
    fun Main.commonRun() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
Back to top