Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 116 for Sample (0.18 sec)

  1. docs/features/events.md

    ### EventListener.Factory
    
    In the preceding example we used a field, `callStartNanos`, to track the elapsed time of each event. This is handy, but it won’t work if multiple calls are executing concurrently. To accommodate this, use a `Factory` to create a new `EventListener` instance for each `Call`. This allows each listener to keep call-specific state.
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  2. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

        address[b++] = (value.ushr(8) and 0xff).toByte()
        address[b++] = (value and 0xff).toByte()
      }
    
      // All done. If compression happened, we need to move bytes to the right place in the
      // address. Here's a sample:
      //
      //      input: "1111:2222:3333::7777:8888"
      //     before: { 11, 11, 22, 22, 33, 33, 00, 00, 77, 77, 88, 88, 00, 00, 00, 00  }
      //   compress: 6
      //          b: 10
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  4. docs/changelogs/changelog_4x.md

        private development environments that only carry test data. Prefer this over creating an
        all-trusting `TrustManager` because only hosts on the allowlist are insecure. From
        [our DevServer sample][dev_server]:
    
        ```kotlin
        val clientCertificates = HandshakeCertificates.Builder()
            .addPlatformTrustedCertificates()
            .addInsecureHost("localhost")
            .build()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  5. docs/features/https.md

          private InputStream trustedCertificatesInputStream() {
            ... // Full source omitted. See sample.
          }
    
          public SSLContext sslContextForTrustedCertificates(InputStream in) {
            ... // Full source omitted. See sample.
          }
        ```
    
     [CustomTrustJava]: https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Dec 24 00:16:30 GMT 2022
    - 10.5K bytes
    - Viewed (0)
  6. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * 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;
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

        bytesIn.writeUtf8("www.example.com")
      }
    
      private fun checkReadFirstRequestWithoutHuffman() {
        assertThat(hpackReader!!.headerCount).isEqualTo(1)
    
        // [  1] (s =  57) :authority: www.example.com
        val entry = hpackReader!!.dynamicTable[readerHeaderTableLength() - 1]!!
        checkEntry(entry, ":authority", "www.example.com", 57)
    
        // Table size: 57
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/RequestTest.kt

          builder.addHeader("", "Value")
        }
      }
    
      @Test
      fun headerAllowsTabOnlyInValues() {
        val builder = Request.Builder()
        builder.header("key", "sample\tvalue")
        assertFailsWith<IllegalArgumentException> {
          builder.header("sample\tkey", "value")
        }
      }
    
      @Test
      fun headerForbidsControlCharacters() {
        assertForbiddenHeader("\u0000")
        assertForbiddenHeader("\r")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  9. samples/crawler/build.gradle.kts

    plugins {
      kotlin("jvm")
      application
    }
    
    application {
      mainClass.set("okhttp3.sample.Crawler")
    }
    
    dependencies {
      implementation(projects.okhttp)
      implementation(libs.jsoup)
    }
    
    tasks.compileJava {
      options.isWarnings = false
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Feb 15 23:38:32 GMT 2022
    - 234 bytes
    - Viewed (0)
  10. samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java

     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * 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;
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
Back to top