Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for toRequestBody (0.15 sec)

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

    import okhttp3.Headers.Companion.headersOf
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.RequestBody.Companion.toRequestBody
    
    class RequestCommonTest {
      @Test
      fun constructorNormal() {
        val url = "https://example.com/".toHttpUrl()
        val body = "hello".toRequestBody()
        val headers = headersOf("User-Agent", "RequestTest")
        val method = "PUT"
        val request =
          Request(
            url = url,
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 10.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CallTest.kt

    import okhttp3.Credentials.basic
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.ResponseBody.Companion.asResponseBody
    import okhttp3.TestUtil.assumeNotWindows
    import okhttp3.TestUtil.awaitGarbageCollection
    import okhttp3.internal.DoubleInetAddressDns
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-04-10 19:46
    - 142.5K bytes
    - Viewed (2)
  3. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

    import mockwebserver3.SocketPolicy.ShutdownOutputAtEnd
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.TestUtil.assertSuppressed
    import okhttp3.internal.DoubleInetAddressDns
    import okhttp3.internal.connection.RealConnection
    import okhttp3.internal.connection.RealConnection.Companion.IDLE_CONNECTION_HEALTHY_NS
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-01-20 10:30
    - 8.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

        val body =
          MultipartBody.Builder("boundary")
            .setType(MultipartBody.PARALLEL)
            .addPart("Quick".toRequestBody("text/plain".toMediaType()))
            .addFormDataPart("color", "Brown")
            .addFormDataPart("animal", "fox.txt", "Fox".toRequestBody())
            .build()
    
        val bodyContent = Buffer()
        body.writeTo(bodyContent)
    
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 13.8K bytes
    - Viewed (0)
  5. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.RecordingHostnameVerifier
    import okhttp3.Request
    import okhttp3.RequestBody
    import okhttp3.RequestBody.Companion.gzip
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.logging.HttpLoggingInterceptor.Level
    import okhttp3.testing.PlatformRule
    import okio.Buffer
    import okio.BufferedSink
    import okio.ByteString.Companion.decodeBase64
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-04-06 09:14
    - 37.6K bytes
    - Viewed (0)
  6. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

    import okhttp3.HttpUrl
    import okhttp3.MediaType
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.Response
    import okhttp3.internal.platform.Platform
    import okhttp3.internal.publicsuffix.PublicSuffixDatabase
    
    /**
     * [DNS over HTTPS implementation][doh_spec].
     *
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-03-22 07:09
    - 9.8K bytes
    - Viewed (0)
  7. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

    import okhttp3.HttpUrl
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.OkHttpClientTestRule
    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.Response
    import okhttp3.TestUtil.assumeNotWindows
    import okhttp3.testing.PlatformRule
    import org.junit.jupiter.api.Assertions.fail
    import org.junit.jupiter.api.BeforeEach
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-01-14 10:20
    - 10.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/EventListenerTest.kt

        requestBodySuccess(
          "Hello".toRequestBody("text/plain".toMediaType()),
          CoreMatchers.equalTo(5L),
          CoreMatchers.equalTo(19L),
        )
      }
    
      @Test
      fun requestBodySuccessHttp() {
        requestBodySuccess(
          "Hello".toRequestBody("text/plain".toMediaType()),
          CoreMatchers.equalTo(5L),
          CoreMatchers.equalTo(19L),
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-01-20 10:30
    - 56.9K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/InterceptorTest.kt

    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.DisconnectAtEnd
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.ResponseBody.Companion.toResponseBody
    import okhttp3.TestUtil.assertSuppressed
    import okio.Buffer
    import okio.BufferedSink
    import okio.ForwardingSink
    import okio.ForwardingSource
    import okio.GzipSink
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-01-14 10:20
    - 27.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

    import mockwebserver3.SocketPolicy.DisconnectAtEnd
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.ResponseBody.Companion.toResponseBody
    import okhttp3.internal.closeQuietly
    import okhttp3.testing.PlatformRule
    import okhttp3.tls.HandshakeCertificates
    import org.bouncycastle.tls.TlsFatalAlert
    Registered: 2024-06-16 04:42
    - Last Modified: 2024-01-08 01:13
    - 12.3K bytes
    - Viewed (0)
Back to top