Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for url (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

            !connection.noNewExchanges -> null
    
            !connection.route().address.url.canReuseConnectionFor(address.url) -> null
    
            else -> connection.route()
          }
        }
      }
    
      override fun sameHostAndPort(url: HttpUrl): Boolean {
        val routeUrl = address.url
        return url.port == routeUrl.port && url.host == routeUrl.host
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CacheTest.kt

            .build(),
        )
        val url = server.url("/")
        assertThat(get(url).body.string()).isEqualTo("A")
        val request =
          Request.Builder()
            .url(url)
            .method("POST", requestBodyOrNull("POST"))
            .build()
        val invalidate = client.newCall(request).execute()
        assertThat(invalidate.body.string()).isEqualTo("B")
        assertThat(get(url).body.string()).isEqualTo("C")
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

        return deferredPlans.isNotEmpty() || nextPlanIndex < plans.size || autoGeneratePlans
      }
    
      override fun sameHostAndPort(url: HttpUrl): Boolean {
        return url.host == address.url.host && url.port == address.url.port
      }
    
      override fun close() {
        factory.close()
      }
    
      inner class FakePlan(
        val id: Int,
      ) : RoutePlanner.Plan {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        val location = userResponse.header("Location") ?: return null
        // Don't follow redirects to unsupported protocols.
        val url = userResponse.request.url.resolve(location) ?: return null
    
        // If configured, don't follow redirects between SSL and non-SSL.
        val sameScheme = url.scheme == userResponse.request.url.scheme
        if (!sameScheme && !client.followSslRedirects) return null
    
        // Most redirects don't include a request body.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  5. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

          webSocketCloseTimeout: Long = RealWebSocket.CANCEL_AFTER_CLOSE_MILLIS,
        ) {
          val url = "http://example.com/websocket"
          val response =
            Response.Builder()
              .code(101)
              .message("OK")
              .request(Request.Builder().url(url).build())
              .headers(responseHeaders!!)
              .protocol(Protocol.HTTP_1_1)
              .build()
          webSocket =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        val c1 = factory.newConnection(pool, routeA1, 50L)
        val client =
          OkHttpClient.Builder()
            .connectionPool(poolApi)
            .build()
        val call = client.newCall(Request(addressA.url)) as RealCall
        call.enterNetworkInterceptorExchange(call.request(), true, factory.newChain(call))
        c1.withLock { call.acquireConnectionNoEvents(c1) }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

        }
        return result
      }
    
    fun Response.commonClose() {
      body.close()
    }
    
    fun Response.commonToString(): String = "Response{protocol=$protocol, code=$code, message=$message, url=${request.url}}"
    
    fun Response.Builder.commonRequest(request: Request) =
      apply {
        this.request = request
      }
    
    fun Response.Builder.commonProtocol(protocol: Protocol) =
      apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  8. okhttp/api/okhttp.api

    	public fun tag (Ljava/lang/Object;)Lokhttp3/Request$Builder;
    	public final fun tag (Lkotlin/reflect/KClass;Ljava/lang/Object;)Lokhttp3/Request$Builder;
    	public fun url (Ljava/lang/String;)Lokhttp3/Request$Builder;
    	public fun url (Ljava/net/URL;)Lokhttp3/Request$Builder;
    	public fun url (Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;
    }
    
    public abstract class okhttp3/RequestBody {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

          .addNetworkInterceptor(CHECK_HANDSHAKE_INTERCEPTOR)
          .build();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  10. okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt

      @RegisterExtension
      val clientTestRule = OkHttpClientTestRule()
    
      private var client = clientTestRule.newClientBuilder().build()
    
      private lateinit var server: MockWebServer
    
      val request by lazy { Request(server.url("/")) }
    
      @BeforeEach
      fun setup(server: MockWebServer) {
        this.server = server
      }
    
      @Test
      fun suspendCall() {
        runTest {
          server.enqueue(MockResponse(body = "abc"))
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top