- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for from (0.14 sec)
-
samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java
// sufficient to connect to most HTTPS sites including https://godaddy.com and https://visa.com. // Typically developers will need to get a PEM file from their organization's TLS administrator. final X509Certificate comodoRsaCertificationAuthority = Certificates.decodeCertificatePem("" + "-----BEGIN CERTIFICATE-----\n"
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/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java
* cannot do TLS over domain sockets. */ public class ClientAndServer { public void run() throws Exception { File socketFile = new File("/tmp/ClientAndServer.sock"); socketFile.delete(); // Clean up from previous runs. MockWebServer server = new MockWebServer(); server.setServerSocketFactory(new UnixDomainServerSocketFactory(socketFile)); server.setProtocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE));
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Dec 24 03:46:30 GMT 2018 - 2.1K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/RtmSession.java
RtmStartResponse rtmStartResponse = slackApi.rtmStart(accessToken); webSocket = slackApi.rtm(rtmStartResponse.url, this); } // TODO(jwilson): can I read the response body? Do I have to? // the body from slack is a 0-byte-buffer @Override public synchronized void onOpen(WebSocket webSocket, Response response) { System.out.println("onOpen: " + response); }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Nov 19 20:16:58 GMT 2016 - 2.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java
.build(); OkHttpClient clientForCall; if (i == 2) { // Force this request's response to be written to the cache. This way, subsequent responses // can be read from the cache. System.out.println("Force cache: true"); clientForCall = client.newBuilder() .addNetworkInterceptor(REWRITE_CACHE_CONTROL_INTERCEPTOR) .build(); } else {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 12 03:31:36 GMT 2019 - 2.6K bytes - Viewed (0) -
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; /** * Fetches HTML from a requested URL, follows the links, and repeats. */ public final class Crawler { private final OkHttpClient client; private final Set<HttpUrl> fetchedUrls = Collections.synchronizedSet(new LinkedHashSet<>());
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 4.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java
public void run() throws Exception { // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image RequestBody requestBody = new MultipartBody.Builder() .setType(MultipartBody.FORM) .addFormDataPart("title", "Square Logo") .addFormDataPart("image", "logo-square.png", RequestBody.create( new File("docs/images/logo-square.png"), MEDIA_TYPE_PNG))
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jun 24 12:59:42 GMT 2019 - 2.2K bytes - Viewed (0)