Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 100 for example (0.23 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/FailedPlan.kt

     *    to use `H2_PRIOR_KNOWLEDGE` but the URL's scheme is `https:`.
     *  * Preemptive proxy authentication failed.
     *
     * Planning failures are not necessarily fatal. For example, even if we can't DNS lookup the first
     * proxy in a list, looking up a subsequent one may succeed.
     */
    internal class FailedPlan(e: Throwable) : RoutePlanner.Plan {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CookieTest.kt

            "a=b; Path=/c;                     Max-Age=5; Secure; HttpOnly",
            "a=b; Path=/c; Domain=example.com;            Secure; HttpOnly",
            "a=b; Path=/c; Domain=example.com; Max-Age=5;         HttpOnly",
            "a=b; Path=/c; Domain=example.com; Max-Age=5; Secure;         ",
            "a=b; Path=/c; Domain=example.com; Max-Age=5; Secure; HttpOnly; SameSite=Lax",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 24.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/InsecureForHostTest.kt

      }
    
      @Test fun `bad certificates host in insecureHosts fails with SSLException`() {
        val heldCertificate =
          HeldCertificate.Builder()
            .addSubjectAlternativeName("example.com")
            .build()
        val serverCertificates =
          HandshakeCertificates.Builder()
            .heldCertificate(heldCertificate)
            .build()
        server.useHttps(serverCertificates.sslSocketFactory())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  4. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt

    import org.apache.hc.core5.http.ProtocolVersion
    import org.junit.Assert
    import org.junit.Test
    
    /**
     * Simplified from
     * https://hc.apache.org/httpcomponents-client-5.0.x/httpclient5/examples/AsyncClientTlsAlpn.java
     *
     * Mainly intended to verify behaviour of popular clients across Android versions, similar
     * to observing Firefox or Chrome browser behaviour.
     */
    class ApacheHttpClientHttp2Test {
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  5. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

    package okhttp3.sample;
    
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;
    import java.security.GeneralSecurityException;
    import java.security.KeyStore;
    import java.security.SecureRandom;
    import javax.net.ssl.KeyManagerFactory;
    import javax.net.ssl.SSLContext;
    import javax.net.ssl.TrustManagerFactory;
    import okhttp3.mockwebserver.Dispatcher;
    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)
  6. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

        }
    
      /**
       * Returns a string with containing this URL with its username, password, query, and fragment
       * stripped, and its path replaced with `/...`. For example, redacting
       * `http://username:password@example.com/path` returns `http://example.com/...`.
       */
      fun redact(): String {
        return newBuilder("/...")!!
          .username("")
          .password("")
          .build()
          .toString()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  7. okhttp/src/main/kotlin/okhttp3/Response.kt

     * [ResponseBody] for an explanation and examples.
     */
    class Response internal constructor(
      /**
       * The request that initiated this HTTP response. This is not necessarily the same request issued
       * by the application:
       *
       * * It may be transformed by the user's interceptors. For example, an application interceptor
       *   may add headers like `User-Agent`.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/RecordedRequest.kt

       * multiple requests, each request is assigned its own sequence number.
       */
      val sequenceNumber: Int,
      socket: Socket,
      /**
       * The failure MockWebServer recorded when attempting to decode this request. If, for example,
       * the inbound request was truncated, this exception will be non-null.
       */
      val failure: IOException? = null,
    ) {
      val method: String?
      val path: String?
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3.8K bytes
    - Viewed (1)
  9. README.md

    supports both synchronous blocking calls and async calls with callbacks.
    
    
    Get a URL
    ---------
    
    This program downloads a URL and prints its contents as a string. [Full source][get_example].
    
    ```java
    OkHttpClient client = new OkHttpClient();
    
    String run(String url) throws IOException {
      Request request = new Request.Builder()
          .url(url)
          .build();
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt

      }
    
      private fun logWithTime(message: String) {
        val startNs = startNs
        val timeMs =
          if (startNs == null) {
            // Event occurred before start, for an example an early cancel.
            0L
          } else {
            TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs)
          }
    
        logger.invoke("[$timeMs ms] $message")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
Back to top