Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for takeRequest (0.08 sec)

  1. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        assertThat(responseA.body.string()).isEqualTo("a")
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        val responseB = client.newCall(request).execute()
        assertThat(responseB.body.string()).isEqualTo("b")
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(1)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CookiesTest.kt

            .cookieJar(JavaNetCookieJar(cookieManager))
            .build()
        get(urlWithIpAddress(server, "/"))
        val request1 = server.takeRequest()
        assertThat(request1.headers["Cookie"]).isNull()
        get(urlWithIpAddress(server, "/"))
        val request2 = server.takeRequest()
        assertThat(request2.headers["Cookie"]).isEqualTo("a=android; b=banana")
      }
    
      @Test
      fun testRedirectsDoNotIncludeTooManyCookies() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13K bytes
    - Viewed (0)
  3. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        assertThat(result).contains(address("157.240.1.18"))
        assertThat(result).contains(address("2a03:2880:f029:11:face:b00c:0:2"))
        val request1 = server.takeRequest()
        assertThat(request1.method).isEqualTo("GET")
        val request2 = server.takeRequest()
        assertThat(request2.method).isEqualTo("GET")
        assertThat(listOf(request1.path, request2.path))
          .containsExactlyInAnyOrder(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        assertThat(reader.readLine()).isEqualTo("hello world")
        val request = server.takeRequest()
        assertThat(request.requestLine).isEqualTo("GET / HTTP/1.1")
        assertThat(request.headers["Accept-Language"]).isEqualTo("en-US")
    
        // Server has no more requests.
        assertThat(server.takeRequest(100, TimeUnit.MILLISECONDS)).isNull()
      }
    
      @Test
      fun redirect() {
        server.enqueue(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  5. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(reader.readLine()).isEqualTo("hello world")
        val request = server.takeRequest()
        assertThat(request.requestLine).isEqualTo("GET / HTTP/1.1")
        assertThat(request.getHeader("Accept-Language")).isEqualTo("en-US")
    
        // Server has no more requests.
        assertThat(server.takeRequest(100, TimeUnit.MILLISECONDS)).isNull()
      }
    
      @Test
      fun redirect() {
        server.enqueue(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

          assertThat(response.body.string()).isEqualTo("after misdirect")
        }
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(1)
        assertThat(server.takeRequest().sequenceNumber)
          .isEqualTo(0) // Fresh connection.
        assertThat(client.connectionPool.connectionCount()).isEqualTo(2)
      }
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

        val call = client.newCall(Request(url))
        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("this was the 2nd request on IPv4")
        assertThat(serverIpv4.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(serverIpv4.takeRequest().sequenceNumber).isEqualTo(1)
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

            .url(webServer.url("/"))
            .build()
        val response = client.newCall(regularRequest).execute()
        response.close()
        assertThat(webServer.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(webServer.takeRequest().sequenceNumber).isEqualTo(1)
      }
    
      /** https://github.com/square/okhttp/issues/5705  */
      @Test
      fun closeWithoutSuccessfulConnect() {
        val request =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  9. mockwebserver/api/mockwebserver3.api

    	public final fun start (Ljava/net/InetAddress;I)V
    	public static synthetic fun start$default (Lmockwebserver3/MockWebServer;IILjava/lang/Object;)V
    	public final fun takeRequest ()Lmockwebserver3/RecordedRequest;
    	public final fun takeRequest (JLjava/util/concurrent/TimeUnit;)Lmockwebserver3/RecordedRequest;
    	public final fun toProxyAddress ()Ljava/net/Proxy;
    	public fun toString ()Ljava/lang/String;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 03 21:59:45 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  10. mockwebserver-deprecated/api/mockwebserver.api

    	public final fun start (Ljava/net/InetAddress;I)V
    	public static synthetic fun start$default (Lokhttp3/mockwebserver/MockWebServer;IILjava/lang/Object;)V
    	public final fun takeRequest ()Lokhttp3/mockwebserver/RecordedRequest;
    	public final fun takeRequest (JLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/RecordedRequest;
    	public final fun toProxyAddress ()Ljava/net/Proxy;
    	public fun toString ()Ljava/lang/String;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jul 22 12:28:51 UTC 2023
    - 10.2K bytes
    - Viewed (0)
Back to top