Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 211 for url (0.13 sec)

  1. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        server.enqueue(MockResponse().setSocketPolicy(SocketPolicy.SHUTDOWN_SERVER_AFTER_RESPONSE))
        val url = server.url("/").toUrl()
        val connection = url.openConnection() as HttpURLConnection
        assertThat(connection.getResponseCode()).isEqualTo(HttpURLConnection.HTTP_OK)
        val refusedConnection = url.openConnection() as HttpURLConnection
        assertFailsWith<ConnectException> {
          refusedConnection.getResponseCode()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/CallConnectionUser.kt

        return call.connection
      }
    
      override fun proxySelectStart(url: HttpUrl) {
        eventListener.proxySelectStart(call, url)
      }
    
      override fun proxySelectEnd(
        url: HttpUrl,
        proxies: List<Proxy>,
      ) {
        eventListener.proxySelectEnd(call, url, proxies)
      }
    
      override fun dnsStart(socketHost: String) {
        eventListener.dnsStart(call, socketHost)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  3. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        }
      }
    
      private fun OkHttpClient.get(url: String) {
        val request = Request.Builder().url(url).build()
        val response = this.newCall(request).execute()
    
        response.use {
          assertEquals(200, response.code)
        }
      }
    
      fun buildCloudflareIp(bootstrapClient: OkHttpClient): DnsOverHttps {
        return DnsOverHttps.Builder().client(bootstrapClient)
          .url("https://1.1.1.1/dns-query".toHttpUrl())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  4. docs/features/connections.md

    Connections
    ===========
    
    Although you provide only the URL, OkHttp plans its connection to your webserver using three types: URL, Address, and Route.
    
    ### [URLs](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-http-url/)
    
    URLs (like `https://github.com/square/okhttp`) are fundamental to HTTP and the Internet. In addition to being a universal, decentralized naming scheme for everything on the web, they also specify how to access web resources.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Feb 21 03:33:59 GMT 2022
    - 5.4K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

        server.useHttps(socketFactory)
        server.requestClientAuth()
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .build(),
        )
        val call = client.newCall(Request.Builder().url(server.url("/")).build())
        val response = call.execute()
        assertThat(response.handshake!!.peerPrincipal)
          .isEqualTo(X500Principal("CN=Local Host"))
        assertThat(response.handshake!!.localPrincipal)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val interceptor = HttpLoggingInterceptor()
        val level = interceptor.getLevel()
      }
    
      @Test @Disabled
      fun httpUrl() {
        val httpUrl: HttpUrl = HttpUrl.get("")
        val url: URL = httpUrl.url()
        val uri: URI = httpUrl.uri()
        val scheme: String = httpUrl.scheme()
        val encodedUsername: String = httpUrl.encodedUsername()
        val username: String = httpUrl.username()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/DispatcherTest.kt

            }
          }
        thread.start()
        return thread
      }
    
      private fun newRequest(url: String): Request {
        return Request.Builder().url(url).build()
      }
    
      private fun newRequest(
        url: String,
        tag: String,
      ): Request {
        return Request.Builder().url(url).tag(tag).build()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

            maxSize = 10L * 1024 * 1024,
          )
        println("Bad targets\n***********\n")
        val url = "https://dns.cloudflare.com/.not-so-well-known/run-dmc-query".toHttpUrl()
        val badProviders =
          listOf(
            DnsOverHttps.Builder()
              .client(bootstrapClient)
              .url(url)
              .post(true)
              .build(),
          )
        runBatch(badProviders, names)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CookiesTest.kt

        val cookieJar = JavaNetCookieJar(cookieManager)
        val url = "https://www.squareup.com/".toHttpUrl()
        cookieJar.saveFromResponse(url, listOf(parse(url, "a=android; Domain=squareup.com")!!))
        val actualCookies = cookieJar.loadForRequest(url)
        assertThat(actualCookies.size).isEqualTo(1)
        assertThat(actualCookies[0].name).isEqualTo("a")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

            .build()
      }
    
      @Test
      fun http2OneBadHostOneGoodNoRetryOnConnectionFailure() {
        enableProtocol(Protocol.HTTP_2)
    
        val request = Request(server1.url("/"))
    
        server1.enqueue(refusedStream)
        server2.enqueue(bodyResponse)
    
        dns[server1.hostName] = listOf(ipv6, ipv4)
        socketFactory[ipv6] = server1.inetSocketAddress
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.9K bytes
    - Viewed (0)
Back to top