- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for Code (0.19 sec)
-
samples/slack/src/main/java/okhttp3/slack/SlackApi.java
} /** See https://api.slack.com/methods/oauth.access. */ public OAuthSession exchangeCode(String code, HttpUrl redirectUrl) throws IOException { HttpUrl url = baseUrl.newBuilder("oauth.access") .addQueryParameter("client_id", clientId) .addQueryParameter("client_secret", clientSecret) .addQueryParameter("code", code) .addQueryParameter("redirect_uri", redirectUrl.toString()) .build();
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) -
regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java
Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { assertTrue(response.code() == 200 || response.code() == 404); assertEquals(Protocol.HTTP_2, response.protocol()); for (Certificate c: response.handshake().peerCertificates()) { X509Certificate x = (X509Certificate) c;
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jul 26 06:37:08 GMT 2021 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostFile.java
.post(RequestBody.create(file, MEDIA_TYPE_MARKDOWN)) .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } } public static void main(String... args) throws Exception { new PostFile().run(); }
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
.post(requestBody) .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } } public static void main(String... args) throws Exception { new PostStreaming().run(); }
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/guide/src/main/java/okhttp3/recipes/CertificatePinning.java
.url("https://publicobject.com/robots.txt") .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); for (Certificate certificate : response.handshake().peerCertificates()) { System.out.println(CertificatePinner.pin(certificate)); } } }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 08 21:30:01 GMT 2019 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java
for (int i = 0; i < responseHeaders.size(); i++) { System.out.println(responseHeaders.name(i) + ": " + responseHeaders.value(i)); } throw new IOException("Unexpected code " + response); } System.out.println(response.body().string()); } } public static void main(String... args) throws Exception { new CustomTrust().run(); }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 9.3K bytes - Viewed (2) -
samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java
return mockWebServer.url("/oauth/"); } /** When the browser hits the redirect URL, use the provided code to ask Slack for a session. */ @Override public MockResponse dispatch(RecordedRequest request) { HttpUrl requestUrl = mockWebServer.url(request.getPath()); String code = requestUrl.queryParameter("code"); String stateString = requestUrl.queryParameter("state");
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 3.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java
.connectionSpecs(Collections.singletonList(spec)) .sslSocketFactory(customSslSocketFactory, trustManager) .build(); } /** * Returns the VM's default SSL socket factory, using {@code trustManager} for trusted root * certificates. */ private SSLSocketFactory defaultSslSocketFactory(X509TrustManager trustManager) throws NoSuchAlgorithmException, KeyManagementException {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Mar 14 21:57:42 GMT 2019 - 6.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java
System.out.println("MESSAGE: " + bytes.hex()); } @Override public void onClosing(WebSocket webSocket, int code, String reason) { webSocket.close(1000, null); System.out.println("CLOSE: " + code + " " + reason); } @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) { t.printStackTrace(); }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 04 11:40:21 GMT 2024 - 1.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java
.build(); String response1Body; try (Response response1 = client.newCall(request).execute()) { if (!response1.isSuccessful()) throw new IOException("Unexpected code " + response1); response1Body = response1.body().string(); System.out.println("Response 1 response: " + response1); System.out.println("Response 1 cache response: " + response1.cacheResponse());
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun May 22 01:29:42 GMT 2016 - 2.4K bytes - Viewed (0)