Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for toRequestBody (0.07 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt

          replaceWith =
            ReplaceWith(
              expression = "content.toRequestBody(contentType)",
              imports = ["okhttp3.RequestBody.Companion.toRequestBody"],
            ),
          level = DeprecationLevel.WARNING,
        )
        fun create(
          contentType: MediaType?,
          content: String,
        ): RequestBody = content.toRequestBody(contentType)
    
        @JvmStatic
        @Deprecated(
    Registered: 2025-05-30 11:42
    - Last Modified: 2025-05-27 14:51
    - 9.9K bytes
    - Viewed (0)
  2. 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: 2025-05-30 11:42
    - Last Modified: 2025-05-10 11:15
    - 37.7K bytes
    - Viewed (0)
  3. 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: 2025-05-30 11:42
    - Last Modified: 2025-05-10 13:39
    - 10.4K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/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: 2025-05-30 11:42
    - Last Modified: 2025-05-27 14:58
    - 60.6K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/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: 2025-05-30 11:42
    - Last Modified: 2025-05-27 14:58
    - 146.1K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt

    import mockwebserver3.internal.duplex.MockStreamHandler
    import okhttp3.CallEvent.FollowUpDecision
    import okhttp3.Credentials.basic
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.TestUtil.assumeNotWindows
    import okhttp3.internal.RecordingOkAuthenticator
    import okhttp3.internal.duplex.AsyncRequestBody
    import okhttp3.testing.PlatformRule
    import okio.BufferedSink
    Registered: 2025-05-30 11:42
    - Last Modified: 2025-05-27 14:58
    - 24.8K bytes
    - Viewed (0)
  7. 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: 2025-05-30 11:42
    - Last Modified: 2025-05-10 11:15
    - 8.6K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/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: 2025-05-30 11:42
    - Last Modified: 2025-05-28 02:11
    - 15.4K bytes
    - Viewed (0)
  9. CHANGELOG.md

     *  New: Use TLSv1.3 when running on JDK 8u261 or newer.
     *  New: `QueueDispatcher.clear()` may be used to reset a MockWebServer instance.
     *  New: `FileDescriptor.toRequestBody()` may be particularly useful for users of Android's Storage
        Access Framework.
     *  Upgrade: [Kotlin 1.5.31][kotlin_1_5_31].
     *  Upgrade: [Okio 3.0.0][okio_3_0_0].
    
    
    ## Version 5.0.0-alpha.2
    
    Registered: 2025-05-30 11:42
    - Last Modified: 2025-05-29 16:55
    - 25.3K bytes
    - Viewed (1)
Back to top