Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for Allain (0.15 sec)

  1. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

            .body(
              """
              |data: hey
              |
              |
              """.trimMargin(),
            ).setHeader("content-type", "text/plain")
            .build(),
        )
        newEventSource()
        listener.assertFailure("Invalid content-type: text/plain")
      }
    
      @Test
      fun badResponseCode() {
        server.enqueue(
          MockResponse.Builder()
            .body(
              """
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  2. samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt

            .url(server.url("/"))
            .header("Accept", "text/plain")
            .build()
        val response = client.newCall(request).execute()
        assertThat(response.code).isEqualTo(200)
        assertThat(response.body.string()).isEqualTo("hello, OkHttp")
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt

      }
    
      @Test fun binarySearchEmptyRange() {
        assertEquals(-1, binarySearch(0, 0) { error("unexpected call") })
      }
    
      /** Confirm the compact table has the exact same behavior as the plain table. */
      @Test fun comparePlainAndCompactTables() {
        val buffer = Buffer()
        for (codePoint in 0..0x10ffff) {
          val allowedByTable = table.map(codePoint, buffer)
          val tableMappedTo = buffer.readUtf8()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CacheTest.kt

            .addHeader("Content-Type: text/plain")
            .addHeader("Last-Modified: " + formatDate(-2, TimeUnit.HOURS))
            .addHeader("Expires: " + formatDate(-1, TimeUnit.HOURS))
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .code(HttpURLConnection.HTTP_NOT_MODIFIED)
            .addHeader("Content-Type: text/plain")
            .addHeader("Content-Encoding: gzip")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/MediaTypeTest.kt

        assertInvalid("te<t/plain", "No subtype found for: \"te<t/plain\"")
        assertInvalid(" text/plain", "No subtype found for: \" text/plain\"")
        assertInvalid("te xt/plain", "No subtype found for: \"te xt/plain\"")
        assertInvalid("text /plain", "No subtype found for: \"text /plain\"")
        assertInvalid("text/ plain", "No subtype found for: \"text/ plain\"")
        assertInvalid(
          "text/pl@in",
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/ResponseBodyTest.kt

        val body = text.toResponseBody()
        assertThat(body.string()).isEqualTo(text)
      }
    
      @Test
      fun unicodeTextWithCharset() {
        val text = "eile oli oliiviõli"
        val body = text.toResponseBody("text/plain; charset=UTF-8".toMediaType())
        assertThat(body.string()).isEqualTo(text)
      }
    
      @Test
      fun unicodeByteString() {
        val text = "eile oli oliiviõli"
        val body = text.toResponseBody()
    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)
  7. okhttp/src/main/kotlin/okhttp3/MediaType.kt

      /**
       * Returns the high-level media type, such as "text", "image", "audio", "video", or "application".
       */
      @get:JvmName("type") val type: String,
      /**
       * Returns a specific media subtype, such as "plain" or "png", "mpeg", "mp4" or "xml".
       */
      @get:JvmName("subtype") val subtype: String,
      /** Alternating parameter names with their values, like `["charset", "utf-8"]`. */
      internal val parameterNamesAndValues: Array<String>,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  8. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

        stream: Http2Stream,
        path: String,
      ) {
        val responseHeaders =
          listOf(
            Header(":status", "404"),
            Header(":version", "HTTP/1.1"),
            Header("content-type", "text/plain"),
          )
        stream.writeHeaders(
          responseHeaders = responseHeaders,
          outFinished = false,
          flushHeaders = false,
        )
        val out = stream.getSink().buffer()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

            goodCertificate.certificate,
          )
        server.useHttps(socketFactory)
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .addHeader("Content-Type: text/plain")
            .build(),
        )
    
        // Make a request from client to server. It should succeed certificate checks (unfortunately the
        // rogue CA is trusted) but it should fail certificate pinning.
        val request =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        server.enqueue(MockResponse(body = "a"))
        server.enqueue(MockResponse(body = "b"))
        val request =
          Request(
            url = server.url("/"),
            body = "request body".toRequestBody("text/plain".toMediaType()),
          )
        assertConnectionReused(request, request)
      }
    
      @Test
      fun connectionsAreReusedWithHttp2() {
        enableHttp2()
        server.enqueue(MockResponse(body = "a"))
    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)
Back to top