- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 152 for New (0.15 sec)
-
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
MockWebServer server = new MockWebServer(); server.useHttps(sslContext.getSocketFactory(), false); server.setDispatcher(this); server.start(port); } @Override public MockResponse dispatch(RecordedRequest request) { String path = request.getPath(); try { if (!path.startsWith("/") || path.contains("..")) throw new FileNotFoundException();
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Jan 02 02:50:44 GMT 2019 - 4.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() .addTrustedCertificate(localhostCertificate.certificate()) .build(); OkHttpClient client = new OkHttpClient.Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) .build(); Call call = client.newCall(new Request.Builder() .url(server.url("/"))
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 02 14:04:37 GMT 2023 - 2.1K bytes - Viewed (0) -
docs/features/events.md
```java Request washingtonPostRequest = new Request.Builder() .url("https://www.washingtonpost.com/") .build(); client.newCall(washingtonPostRequest).enqueue(new Callback() { ... }); Request newYorkTimesRequest = new Request.Builder() .url("https://www.nytimes.com/") .build(); client.newCall(newYorkTimesRequest).enqueue(new Callback() { ... }); ```
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 7.7K bytes - Viewed (0) -
mockwebserver/README.md
// Create a MockWebServer. These are lean enough that you can create a new // instance for every unit test. MockWebServer server = new MockWebServer(); // Schedule some responses. server.enqueue(new MockResponse().setBody("hello, world!")); server.enqueue(new MockResponse().setBody("sup, bra?")); server.enqueue(new MockResponse().setBody("yo dog")); // Start the server. server.start();
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 17 15:34:10 GMT 2023 - 5K bytes - Viewed (1) -
docs/changelogs/changelog_4x.md
This artifact has a dependency on Google's Brotli decoder (95 KiB). * New: `EventListener.proxySelectStart()`, `proxySelectEnd()` events give visibility into the proxy selection process. * New: `Response.byteString()` reads the entire response into memory as a byte string. * New: `OkHttpClient.x509TrustManager` accessor. * New: Permit [new WebSocket response codes][iana_websocket]: 1012 (Service Restart), 1013 (Try
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostFile.java
public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { File file = new File("README.md"); Request request = new Request.Builder() .url("https://api.github.com/markdown/raw") .post(RequestBody.create(file, MEDIA_TYPE_MARKDOWN)) .build();
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat May 25 18:02:55 GMT 2019 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
public final class PostStreaming { public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.get("text/x-markdown; charset=utf-8"); private final OkHttpClient client = new OkHttpClient(); public void run() throws Exception { RequestBody requestBody = new RequestBody() { @Override public MediaType contentType() { return MEDIA_TYPE_MARKDOWN; }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Jul 06 03:18:15 GMT 2018 - 2.1K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/SlackApi.java
public final String clientSecret; public final int port; public SlackApi(String clientId, String clientSecret, int port) { this.httpClient = new OkHttpClient.Builder() .build(); this.moshi = new Moshi.Builder() .add(new SlackJsonAdapters()) .build(); this.clientId = clientId; this.clientSecret = clientSecret; this.port = port; }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Jul 06 19:30:55 GMT 2018 - 4.4K bytes - Viewed (1) -
samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java
public ConfigureTimeouts() throws Exception { client = new OkHttpClient.Builder() .connectTimeout(5, TimeUnit.SECONDS) .writeTimeout(5, TimeUnit.SECONDS) .readTimeout(5, TimeUnit.SECONDS) .callTimeout(10, TimeUnit.SECONDS) .build(); } public void run() throws Exception { Request request = new Request.Builder()
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Sep 28 18:00:26 GMT 2019 - 1.5K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainSocketFactory.java
UnixSocketChannel channel = UnixSocketChannel.open(); return new TunnelingUnixSocket(path, channel); } @Override public Socket createSocket(String host, int port) throws IOException { Socket result = createSocket(); try { result.connect(new InetSocketAddress(host, port)); } catch (IOException e) { result.close(); throw e; }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 03 21:33:52 GMT 2023 - 2.1K bytes - Viewed (0)