- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for okHttpClient (0.95 sec)
-
docs/recipes.md
```java private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { Request request = new Request.Builder() .url("http://httpbin.org/delay/1") // This URL is served with a 1 second delay. .build(); // Copy to customize OkHttp for this request. OkHttpClient client1 = client.newBuilder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceFactoryTest.java
public class EventSourceFactoryTest { @StartStop private final MockWebServer server = new MockWebServer(); @Test public void testEventSourceFactory() throws Exception { OkHttpClient client = new OkHttpClient(); EventSource.Factory factory = EventSource.Factory.create(client); server.enqueue( new MockResponse.Builder() .body("data: hello\n\n")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 2.8K bytes - Viewed (0) -
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) -
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) -
okhttp-sse/api/okhttp-sse.api
public static final field INSTANCE Lokhttp3/sse/EventSources; public static final fun createFactory (Lokhttp3/Call$Factory;)Lokhttp3/sse/EventSource$Factory; public static final synthetic fun createFactory (Lokhttp3/OkHttpClient;)Lokhttp3/sse/EventSource$Factory; public static final fun processResponse (Lokhttp3/Response;Lokhttp3/sse/EventSourceListener;)V
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 1.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt
import java.util.concurrent.TimeUnit import kotlin.test.assertFailsWith import okhttp3.Call import okhttp3.Callback import okhttp3.DelegatingServerSocketFactory import okhttp3.DelegatingSocketFactory import okhttp3.OkHttpClient import okhttp3.OkHttpClientTestRule import okhttp3.Request import okhttp3.RequestBody import okhttp3.Response import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 6.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/UploadProgress.java
public final class UploadProgress { private static final String IMGUR_CLIENT_ID = "9199fdef135c122"; private static final MediaType MEDIA_TYPE_PNG = MediaType.get("image/png"); private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image final ProgressListener progressListener = new ProgressListener() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 4.2K bytes - Viewed (1) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicInteger import okhttp3.Call import okhttp3.Callback import okhttp3.EventListener import okhttp3.Interceptor import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import okhttp3.internal.assertLockNotHeld import okhttp3.internal.cache.CacheInterceptor import okhttp3.internal.closeQuietly import okhttp3.internal.concurrent.Lockable
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 17.8K bytes - Viewed (0)