Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 56 for url (0.11 sec)

  1. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

      )
    
      private fun execute(
        engine: HttpEngine,
        executor: ExecutorService,
        url: String,
      ): CompletableFuture<Response> {
        val completableFuture = CompletableFuture<Response>()
        val buffer = Buffer()
    
        val req =
          engine.newUrlRequestBuilder(
            url,
            executor,
            object : Callback {
              override fun onRedirectReceived(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Request.kt

        }
    
        open fun url(url: HttpUrl): Builder =
          apply {
            this.url = url
          }
    
        /**
         * Sets the URL target of this request.
         *
         * @throws IllegalArgumentException if [url] is not a valid HTTP or HTTPS URL. Avoid this
         *     exception by calling [HttpUrl.parse]; it returns null for invalid URLs.
         */
        open fun url(url: String): Builder {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

          client1
            .newCall(
              Request.Builder()
                .url(server.url("/"))
                .build(),
            )
        val client2 =
          client.newBuilder()
            .readTimeout(Duration.ofMillis(200))
            .build()
        val call2 =
          client2
            .newCall(
              Request.Builder()
                .url(server.url("/"))
                .build(),
            )
        val response1 = call1.execute()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        bootstrapClient: OkHttpClient,
        includeIPv6: Boolean,
        post: Boolean = false,
      ): DnsOverHttps {
        val url = server.url("/lookup?ct")
        return DnsOverHttps.Builder().client(bootstrapClient)
          .includeIPv6(includeIPv6)
          .resolvePrivateAddresses(true)
          .url(url)
          .post(post)
          .build()
      }
    
      companion object {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

      private fun resetNextProxy(
        url: HttpUrl,
        proxy: Proxy?,
      ) {
        fun selectProxies(): List<Proxy> {
          // If the user specifies a proxy, try that and only that.
          if (proxy != null) return listOf(proxy)
    
          // If the URI lacks a host (as in "http://</"), don't call the ProxySelector.
          val uri = url.toUri()
          if (uri.host == null) return immutableListOf(Proxy.NO_PROXY)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        dns.assertRequests(uriHost)
        proxySelector.assertRequests(address.url.toUri())
      }
    
      @Test fun proxySelectorReturnsMultipleProxies() {
        val address = factory.newAddress()
        proxySelector.proxies.add(proxyA)
        proxySelector.proxies.add(proxyB)
        val routeSelector = newRouteSelector(address)
        proxySelector.assertRequests(address.url.toUri())
    
        // First try the IP addresses of the first proxy, in sequence.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. samples/guide/src/main/java/okhttp3/guide/PostExample.java

      final OkHttpClient client = new OkHttpClient();
    
      String post(String url, String json) throws IOException {
        RequestBody body = RequestBody.create(json, JSON);
        Request request = new Request.Builder()
            .url(url)
            .post(body)
            .build();
        try (Response response = client.newCall(request).execute()) {
          return response.body().string();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

        )
        webSocket.cancel()
      }
    
      @Test
      @Throws(IOException::class)
      fun clientIncludesForbiddenHeader() {
        newWebSocket(
          Request.Builder()
            .url(webServer.url("/"))
            .header("Sec-WebSocket-Extensions", "permessage-deflate")
            .build(),
        )
        clientListener.assertFailure(
          ProtocolException::class.java,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
Back to top