Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 100 for examples (0.2 sec)

  1. 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)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

          println(response.body.string())
        }
      }
    
      companion object {
        /**
         * The imgur client ID for OkHttp recipes. If you're using imgur for anything other than running
         * these examples, please request your own client ID! https://api.imgur.com/oauth2
         */
        private const val IMGUR_CLIENT_ID = "9199fdef135c122"
        private val MEDIA_TYPE_PNG = "image/png".toMediaType()
      }
    }
    
    fun main() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. docs/recipes.md

     [AccessHeadersJava]: https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/AccessHeaders.java
     [AccessHeadersKotlin]: https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/kt/AccessHeaders.kt
     [PostStringJava]: https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/PostString.java
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  4. okhttp-tls/README.md

    ```
    
    With a server that holds a certificate and a client that trusts it we have enough for an HTTPS
    handshake. The best part of this example is that we don't need to make our test code insecure with a
    a fake `HostnameVerifier` or `X509TrustManager`.
    
    Certificate Authorities
    -----------------------
    
    The above example uses a self-signed certificate. This is convenient for testing but not
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 9.1K bytes
    - Viewed (1)
  5. .github/CONTRIBUTING.md

    - Favour a working external library if appropriate.  There are many examples of OkHttp libraries that can sit on top or hook in via existing APIs.
    - Get working code on a personal branch with tests before you submit a PR.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 17 04:16:26 GMT 2019
    - 1.4K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java

    import okhttp3.RequestBody;
    import okhttp3.Response;
    
    public final class PostMultipart {
      /**
       * The imgur client ID for OkHttp recipes. If you're using imgur for anything other than running
       * these examples, please request your own client ID! https://api.imgur.com/oauth2
       */
      private static final String IMGUR_CLIENT_ID = "9199fdef135c122";
      private static final MediaType MEDIA_TYPE_PNG = MediaType.get("image/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)
  7. README.md

    ```
    
     [bom]: https://docs.gradle.org/6.2/userguide/platforms.html#sub:bom_import
     [changelog]: https://square.github.io/okhttp/changelog/
     [conscrypt]: https://github.com/google/conscrypt/
     [get_example]: https://raw.github.com/square/okhttp/master/samples/guide/src/main/java/okhttp3/guide/GetExample.java
     [kotlin]: https://kotlinlang.org/
    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)
  8. 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)
  9. okhttp/src/test/java/okhttp3/CipherSuiteTest.kt

          .isNotEqualTo(CipherSuite.TLS_RSA_EXPORT_WITH_RC4_40_MD5)
      }
    
      @Test
      fun forJavaName_acceptsArbitraryStrings() {
        // Shouldn't throw.
        forJavaName("example CipherSuite name that is not in the whitelist")
      }
    
      @Test
      fun javaName_examples() {
        assertThat(CipherSuite.TLS_RSA_EXPORT_WITH_RC4_40_MD5.javaName)
          .isEqualTo("SSL_RSA_EXPORT_WITH_RC4_40_MD5")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java

    import okio.GzipSink;
    import okio.Okio;
    
    public final class RequestBodyCompression {
      /**
       * The Google API KEY for OkHttp recipes. If you're using Google APIs for anything other than
       * running these examples, please request your own client ID!
       *
       * https://console.developers.google.com/project
       */
      public static final String GOOGLE_API_KEY = "AIzaSyAx2WZYe0My0i-uGurpvraYJxO7XNbwiGs";
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 3.8K bytes
    - Viewed (0)
Back to top