Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 181 for httpclient (0.26 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/AsynchronousGet.kt

     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.IOException
    import okhttp3.Call
    import okhttp3.Callback
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.Response
    
    class AsynchronousGet {
      private val client = OkHttpClient()
    
      fun run() {
        val request =
          Request
            .Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

    import okhttp3.MediaType;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.RequestBody;
    import okhttp3.Response;
    import okio.BufferedSink;
    import okio.Okio;
    import okio.Pipe;
    
    public final class PostStreamingWithPipe {
      public static final MediaType MEDIA_TYPE_MARKDOWN
          = MediaType.get("text/x-markdown; charset=utf-8");
    
      private final OkHttpClient client = new OkHttpClient();
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jul 06 03:18:15 UTC 2018
    - 3.1K bytes
    - Viewed (0)
  3. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

    import okhttp3.Call
    import okhttp3.OkHttpClient
    import okhttp3.Response
    import okhttp3.sse.EventSource.Companion.processEventSource
    import okhttp3.sse.EventSource.Factory.Companion.asEventSourceFactory
    
    object EventSources {
      @Deprecated(
        message = "required for binary-compatibility!",
        level = DeprecationLevel.HIDDEN,
      )
      @JvmStatic
      fun createFactory(client: OkHttpClient) = client.asEventSourceFactory()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.IOException
    import java.net.HttpURLConnection.HTTP_MOVED_TEMP
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.mockwebserver.MockResponse
    import okhttp3.mockwebserver.MockWebServer
    import okhttp3.tls.HandshakeCertificates
    import okhttp3.tls.internal.TlsUtil
    
    class DevServer {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt

     */
    package okhttp3.recipes.kt
    
    import com.squareup.moshi.JsonClass
    import com.squareup.moshi.Moshi
    import java.io.IOException
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class ParseResponseWithMoshi {
      private val client = OkHttpClient()
      private val moshi = Moshi.Builder().build()
      private val gistJsonAdapter = moshi.adapter(Gist::class.java)
    
      fun run() {
        val request =
          Request
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  6. okhttp-tls/README.md

    Entrust and Verisign.
    
    This is the behavior you'll get with your OkHttpClient if you don't specifically configure
    `HandshakeCertificates`. Or you can do it explicitly with `addPlatformTrustedCertificates()`:
    
    ```java
    HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
        .addPlatformTrustedCertificates()
        .build();
    OkHttpClient client = new OkHttpClient.Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 19:32:33 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt

    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.Route
    
    /**
     * Adapts [Authenticator] to [okhttp3.Authenticator]. Configure OkHttp to use [Authenticator] with
     * [okhttp3.OkHttpClient.Builder.authenticator] or [okhttp3.OkHttpClient.Builder.proxyAuthenticator].
     */
    class JavaNetAuthenticator(
      private val defaultDns: Dns = Dns.SYSTEM,
    ) : okhttp3.Authenticator {
      @Throws(IOException::class)
      override fun authenticate(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/UploadProgress.kt

     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.File
    import java.io.IOException
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.RequestBody
    import okhttp3.RequestBody.Companion.asRequestBody
    import okio.Buffer
    import okio.BufferedSink
    import okio.ForwardingSink
    import okio.buffer
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt

       *
       * Client configuration may be used to make follow-up decisions, such as:
       *
       *  * [OkHttpClient.followRedirects] must be true to follow redirects.
       *  * [OkHttpClient.followSslRedirects] must be true to follow redirects that add or remove HTTPS.
       *  * [OkHttpClient.authenticator] must respond to an authorization challenge.
       *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:58:02 UTC 2025
    - 17.4K bytes
    - Viewed (0)
  10. native-image-tests/src/test/kotlin/okhttp3/nativeimage/SampleTest.kt

    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import org.junit.jupiter.api.Test
    
    class SampleTest {
      private val server = MockWebServer()
    
      private val client = OkHttpClient()
    
      @Test
      fun passingTest() {
        assertThat("hello").isEqualTo("hello")
      }
    
      @Test
      fun testMockWebServer() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 22 20:31:49 UTC 2025
    - 1.4K bytes
    - Viewed (0)
Back to top