Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 86 for example (0.18 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

           *
           * Example:
           * ```
           * --> POST /greeting http/1.1 (3-byte body)
           *
           * <-- 200 OK (22ms, 6-byte body)
           * ```
           */
          BASIC,
    
          /**
           * Logs request and response lines and their respective headers.
           *
           * Example:
           * ```
           * --> POST /greeting http/1.1
           * Host: example.com
           * Content-Type: plain/text
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  2. mockwebserver/README.md

    awkward-to-reproduce situations like 500 errors or slow-loading responses.
    
    
    ### Example
    
    Use MockWebServer the same way that you use mocking frameworks like
    [Mockito](https://github.com/mockito/mockito):
    
    1. Script the mocks.
    2. Run application code.
    3. Verify that the expected requests were made.
    
    Here's a complete example:
    
    ```java
    public void test() throws Exception {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  3. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

       * https://github.com/square/okhttp/issues/5667
       */
      @Test
      fun hostToUriStripsCharacters() {
        val httpUrl = "http://example\".com/".toHttpUrl()
        assertThat(httpUrl.toUri().toString()).isEqualTo("http://example.com/")
      }
    
      /** Confirm that URI retains other characters. https://github.com/square/okhttp/issues/5236 */
      @Test
      fun hostToUriStripsCharacters2() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

      fun matches(header: DerHeader): Boolean
    
      /**
       * Returns a value from this adapter.
       *
       * This must always return a value, though it doesn't necessarily need to consume data from
       * [reader]. For example, if the reader's peeked tag isn't readable by this adapter, it may return
       * a default value.
       *
       * If this does read a value, it starts with the tag and length, and reads an entire value,
    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)
  5. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

        .readUtf8()
    }
    
    /**
     * If this is an IP address, this returns the IP address in canonical form.
     *
     * Otherwise, this performs IDN ToASCII encoding and canonicalize the result to lowercase. For
     * example this converts `☃.net` to `xn--n3h.net`, and `WwW.GoOgLe.cOm` to `www.google.com`.
     * `null` will be returned if the host cannot be ToASCII encoded or if the result contains
     * unsupported ASCII characters.
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CertificatePinnerKotlinTest.kt

          CertificatePinner.Builder()
            .add("*.example.com", certA1Sha256Pin)
            .add("a.example.com", certB1Sha256Pin)
            .add("b.example.com", certC1Sha256Pin)
            .build()
    
        val expectedPins =
          listOf(
            Pin("*.example.com", certA1Sha256Pin),
            Pin("a.example.com", certB1Sha256Pin),
          )
        assertThat(certificatePinner.findMatchingPins("a.example.com")).isEqualTo(expectedPins)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  7. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        val bytes = "820b6578616d706c652e636f6d".decodeHex()
        assertThat(CertificateAdapters.generalName.fromDer(bytes))
          .isEqualTo(generalNameDnsName to "example.com")
        assertThat(CertificateAdapters.generalName.toDer(generalNameDnsName to "example.com"))
          .isEqualTo(bytes)
      }
    
      @Test fun `extension with type hint for basic constraints`() {
        val extension =
          Extension(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        assertThat(
          parse("http://example.com")
            .newBuilder()
            .scheme("https")
            .build().port,
        ).isEqualTo(443)
        assertThat(
          parse("https://example.com")
            .newBuilder()
            .scheme("http")
            .build().port,
        ).isEqualTo(80)
        assertThat(
          parse("https://example.com:1234")
            .newBuilder()
            .scheme("http")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_4x.md

        event always used to follow one of these events; now it may be sent without them.
    
     *  New: Upgrade to Kotlin 1.3.61.
    
     *  New: Match any number of subdomains with two asterisks in `CertificatePinner`. For example,
        `**.squareup.com` matches `us-west.www.squareup.com`, `www.squareup.com` and `squareup.com`.
    
     *  New: Share threads more aggressively between OkHttp's HTTP/2 connections, connection pool,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

        //    For example, *.example.com is permitted, while *a.example.com, a*.example.com,
        //    a*b.example.com, a.*.example.com are not permitted.
        // 2. Asterisk (*) cannot match across domain name labels.
        //    For example, *.example.com matches test.example.com but does not match
        //    sub.test.example.com.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top