Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for collection (0.16 sec)

  1. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

        server.setProtocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE));
        server.enqueue(new MockResponse().setBody("hello"));
        server.start();
    
        OkHttpClient client = new OkHttpClient.Builder()
            .socketFactory(new UnixDomainSocketFactory(socketFile))
            .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE))
            .build();
    
    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)
  2. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

    import java.security.GeneralSecurityException;
    import java.security.KeyManagementException;
    import java.security.KeyStore;
    import java.security.NoSuchAlgorithmException;
    import java.util.Arrays;
    import java.util.Collections;
    import java.util.List;
    import javax.net.ssl.SSLContext;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    import javax.net.ssl.TrustManager;
    import javax.net.ssl.TrustManagerFactory;
    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)
  3. samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java

            Protocol protocol, IOException ioe) {
          printEvent("connectFailed");
        }
    
        @Override public void connectionAcquired(Call call, Connection connection) {
          printEvent("connectionAcquired");
        }
    
        @Override public void connectionReleased(Call call, Connection connection) {
          printEvent("connectionReleased");
        }
    
        @Override public void requestHeadersStart(Call call) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java

          long t1 = System.nanoTime();
          Request request = chain.request();
          logger.info(String.format("Sending request %s on %s%n%s",
              request.url(), chain.connection(), request.headers()));
          Response response = chain.proceed(request);
    
          long t2 = System.nanoTime();
          logger.info(String.format("Received response for %s in %.1fms%n%s",
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jan 01 15:55:32 GMT 2016
    - 2K bytes
    - Viewed (0)
  5. samples/slack/src/main/java/okhttp3/slack/SlackClient.java

     * limitations under the License.
     */
    package okhttp3.slack;
    
    import java.io.IOException;
    import java.io.InterruptedIOException;
    import okhttp3.HttpUrl;
    import okio.Timeout;
    
    /** A connection to Slack as a single user. */
    public final class SlackClient {
      private final SlackApi slackApi;
      private OAuthSessionFactory sessionFactory;
    
      /** Guarded by this. */
      private OAuthSession session;
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java

            Protocol protocol, IOException ioe) {
          printEvent("connectFailed");
        }
    
        @Override public void connectionAcquired(Call call, Connection connection) {
          printEvent("connectionAcquired");
        }
    
        @Override public void connectionReleased(Call call, Connection connection) {
          printEvent("connectionReleased");
        }
    
        @Override public void requestHeadersStart(Call call) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 5.3K bytes
    - Viewed (0)
  7. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.sample;
    
    import java.io.File;
    import java.io.IOException;
    import java.util.Collections;
    import java.util.LinkedHashSet;
    import java.util.Set;
    import java.util.concurrent.ConcurrentHashMap;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    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)
  8. regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java

          HandshakeCertificates certificates = new HandshakeCertificates.Builder()
                  .addTrustedCertificate((X509Certificate) isgCertificate)
                  // Uncomment to allow connection to any site generally, but will cause
                  // noticeable memory pressure in Android apps.
    //              .addPlatformTrustedCertificates()
                  .build();
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Nov 17 07:40:31 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

      private static final Interceptor CHECK_HANDSHAKE_INTERCEPTOR = new Interceptor() {
        final Set<String> denylist = Collections.singleton(
            "sha256/afwiKY3RxoMmLkuRW1l7QsPZTJPwDS2pdDROQjXw8ig=");
    
        @Override public Response intercept(Chain chain) throws IOException {
          for (Certificate certificate : chain.connection().handshake().peerCertificates()) {
            String pin = CertificatePinner.pin(certificate);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  10. samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java

     * limitations under the License.
     */
    package okhttp3.sample;
    
    import com.squareup.moshi.JsonAdapter;
    import com.squareup.moshi.Moshi;
    import com.squareup.moshi.Types;
    import java.util.Collections;
    import java.util.List;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    import okhttp3.ResponseBody;
    
    public class OkHttpContributors {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
Back to top