Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for takeRequest (0.13 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        // Settings connection.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        // Reuse settings connection.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(1)
        // Reuse settings connection.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(2)
        // New connection!
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
      }
    
      @ParameterizedTest
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CallTest.kt

        executeSynchronously("/b").assertBody("def")
        executeSynchronously("/c").assertBody("ghi")
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(1)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(2)
      }
    
      /**
       * Each OkHttpClient used to get its own instance of NullProxySelector, and because these weren't
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. okhttp/src/test/java/okhttp3/CacheTest.kt

        assertThat(get(url).body.string()).isEqualTo("B")
        assertThat(server.takeRequest().headers["If-None-Match"]).isNull()
        assertThat(server.takeRequest().headers["If-None-Match"]).isEqualTo("v1")
        assertThat(server.takeRequest().headers["If-None-Match"]).isEqualTo("v1")
        assertThat(server.takeRequest().headers["If-None-Match"]).isEqualTo("v2")
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        mockWebServer.noClientAuth()
        mockWebServer.requestClientAuth()
        mockWebServer.requireClientAuth()
        val request: RecordedRequest = mockWebServer.takeRequest()
        val nullableRequest: RecordedRequest? = mockWebServer.takeRequest(0L, TimeUnit.SECONDS)
        var requestCount: Int = mockWebServer.requestCount
        mockWebServer.enqueue(MockResponse())
        mockWebServer.start()
        mockWebServer.start(0)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  7. 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)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        val server2Host = server2.hostName + ":" + server2.port
        assertThat(server.takeRequest().headers["Host"]).isEqualTo(server1Host)
        assertThat(server2.takeRequest().headers["Host"]).isEqualTo(server2Host)
        assertThat(server.takeRequest().sequenceNumber, "Expected connection reuse")
          .isEqualTo(1)
        assertThat(server2.takeRequest().sequenceNumber, "Expected connection reuse")
          .isEqualTo(1)
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  9. 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)
  10. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

                  .build(),
            ),
          )
        val response = call.execute()
        assertThat(response.isSuccessful).isTrue()
    
        server.takeRequest() // Discard the CONNECT tunnel.
        return server.takeRequest()
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top