Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 313 for _build (0.26 sec)

  1. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
            .dns(dns)
            .build()
    
        server.enqueue(MockResponse())
    
        val url = server.url("/").newBuilder().host("localhost.localdomain").build()
        val call = client.newCall(Request(url = url))
        val response = call.execute()
        assertThat(response.isSuccessful).isTrue()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (1)
  2. samples/slack/src/main/java/okhttp3/slack/SlackApi.java

      public final int port;
    
      public SlackApi(String clientId, String clientSecret, int port) {
        this.httpClient = new OkHttpClient.Builder()
            .build();
        this.moshi = new Moshi.Builder()
            .add(new SlackJsonAdapters())
            .build();
        this.clientId = clientId;
        this.clientSecret = clientSecret;
        this.port = port;
      }
    
      /** See https://api.slack.com/docs/oauth. */
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 19:30:55 GMT 2018
    - 4.4K bytes
    - Viewed (1)
  3. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        assertThat(base.newBuilder("https://host2")!!.build())
          .isEqualTo(parse("https://host2/"))
        assertThat(base.newBuilder("//host2")!!.build())
          .isEqualTo(parse("http://host2/"))
        assertThat(base.newBuilder("/path")!!.build())
          .isEqualTo(parse("http://host/path"))
        assertThat(base.newBuilder("path")!!.build())
          .isEqualTo(parse("http://host/a/path"))
    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)
  4. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

            .addTrustedCertificate(localhostCertificate.certificate())
            .build();
        OkHttpClient client = new OkHttpClient.Builder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
            .build();
    
        Call call = client.newCall(new Request.Builder()
            .url(server.url("/"))
            .build());
        Response response = call.execute();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 02 14:04:37 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  5. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

            .commonName("cash.app")
            .build()
        val certificate = heldCertificate.certificate
        assertThat(certificate.getSubjectX500Principal().name).isEqualTo("CN=cash.app")
      }
    
      @Test
      fun organizationalUnit() {
        val heldCertificate =
          HeldCertificate.Builder()
            .commonName("cash.app")
            .organizationalUnit("cash")
            .build()
        val certificate = heldCertificate.certificate
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  6. okhttp-dnsoverhttps/README.md

      val bootstrapClient = OkHttpClient.Builder().cache(appCache).build()
    
      val dns = DnsOverHttps.Builder().client(bootstrapClient)
        .url("https://dns.google/dns-query".toHttpUrl())
        .bootstrapDnsHosts(InetAddress.getByName("8.8.4.4"), InetAddress.getByName("8.8.8.8"))
        .build()
    
      val client = bootstrapClient.newBuilder().dns(dns).build()
    ```
    
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 740 bytes
    - Viewed (4)
  7. okhttp/src/test/java/okhttp3/OpenJSSETest.kt

          HeldCertificate.Builder()
            .commonName("localhost")
            .addSubjectAlternativeName("localhost")
            .build()
        val handshakeCertificates =
          HandshakeCertificates.Builder()
            .heldCertificate(heldCertificate)
            .addTrustedCertificate(heldCertificate.certificate)
            .build()
    
        client =
          client.newBuilder()
            .sslSocketFactory(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/Authenticate.kt

                return response.request.newBuilder()
                  .header("Authorization", credential)
                  .build()
              }
            },
          )
          .build()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://publicobject.com/secrets/hellosecret.txt")
            .build()
    
        client.newCall(request).execute().use { response ->
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

            .build()
        server.protocols = client.protocols
      }
    
      private fun enableTls() {
        client =
          client.newBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
            .hostnameVerifier(RecordingHostnameVerifier())
            .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

            .host("host")
            .build()
        assertThat(httpUrl.toString()).isEqualTo("http://user@host/")
        assertThat(httpUrl.toUri().toString()).isEqualTo("http://user@host/")
      }
    
      @Test
      fun toUriUsernameSpecialCharacters() {
        val url =
          HttpUrl.Builder()
            .scheme("http")
            .host("host")
            .username("=[]:;\"~|?#@^/$%*")
            .build()
        assertThat(url.toString())
    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)
Back to top