Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 74 for Plain (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 May 03 11:42:14 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/RequestTest.kt

        val contentType = "text/plain".toMediaType()
        val body = "\u0800".toRequestBody(contentType)
        assertThat(body.contentType()).isEqualTo("text/plain; charset=utf-8".toMediaType())
        assertThat(body.contentLength()).isEqualTo(3)
        assertThat(bodyToHex(body)).isEqualTo("e0a080")
      }
    
      @Test
      fun stringWithNonDefaultCharsetSpecified() {
        val contentType = "text/plain; charset=utf-16be".toMediaType()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

          |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
          |
          |... contents of file1.txt ...
          |--BbC04y
          |Content-Disposition: file; filename="file2.gif"
          |Content-Transfer-Encoding: binary
          |Content-Type: image/gif
          |
    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)
  5. docs/logging/README.md

    topic            (string)    Kafka topic used for bucket notifications
    sasl_username    (string)    username for SASL/PLAIN or SASL/SCRAM authentication
    sasl_password    (string)    password for SASL/PLAIN or SASL/SCRAM authentication
    sasl_mechanism   (string)    sasl authentication mechanism, default 'plain'
    tls_client_auth  (string)    clientAuth determines the Kafka server's policy for TLS client auth
    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)
  6. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/MediaTypeJvmTest.kt

        val mediaType = parse("text/plain; charset=\"!@#$%^&*()\"")
        assertNull(mediaType.charsetName())
      }
    
      @Test fun testUnsupportedCharset() {
        val mediaType = parse("text/plain; charset=utf-wtf")
        assertNull(mediaType.charsetName())
      }
    
      @Test fun testCharsetNameIsDoubleQuotedAndSingleQuoted() {
        val mediaType = parse("text/plain;charset=\"'utf-8'\"")
        assertNull(mediaType.charsetName())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

                .header("Content-Type", "text/plain-ish")
                .build(),
            )
          }
        server.enqueue(MockResponse())
        client.newCall(
          request()
            .post("Hi?".toRequestBody(PLAIN))
            .build(),
        ).execute()
        applicationLogs
          .assertLogEqual("--> POST $url")
          .assertLogEqual("Content-Type: text/plain; charset=utf-8")
          .assertLogEqual("Content-Length: 3")
    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)
  9. okhttp/src/test/java/okhttp3/CommonRequestBodyTest.kt

    class CommonRequestBodyTest {
      @Test
      fun correctContentType() {
        val body = "Body"
        val requestBody = body.toRequestBody(MediaType("text/plain", "text", "plain", arrayOf()))
    
        val contentType = requestBody.contentType()!!
    
        assertThat(contentType.mediaType).isEqualTo("text/plain; charset=utf-8")
        assertThat(contentType.parameter("charset")).isEqualTo("utf-8")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/InterceptorTest.kt

        val interceptorResponse =
          Response.Builder()
            .request(request)
            .protocol(Protocol.HTTP_1_1)
            .code(200)
            .message("Intercepted!")
            .body("abc".toResponseBody("text/plain; charset=utf-8".toMediaType()))
            .build()
        client =
          client.newBuilder()
            .addInterceptor(Interceptor { chain: Interceptor.Chain? -> interceptorResponse })
            .build()
    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)
Back to top