- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 874 for respond (3.77 sec)
-
container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt
request().withPath("/person") .withQueryStringParameter("name", "peter"), ) .respond(response().withBody("Peter the person!")) val response = client.newCall(Request((mockServer.endpoint + "/person?name=peter").toHttpUrl())).execute() assertThat(response.body.string()).contains("Peter the person") } } @Test fun testHttpsRequest() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 3.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Authenticator.kt
* to limit the retries by the class of errors and number of attempts. To get the number of * attempts to the current point use this function. * * ```java * private int responseCount(Response response) { * int result = 1; * while ((response = response.priorResponse()) != null) { * result++; * } * return result; * } * ``` * * [1]: https://tools.ietf.org/html/rfc2817 */
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Dec 13 19:45:20 GMT 2023 - 7.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt
* Protocol negotiation is only attempted for HTTPS URLs. * * [Protocol.HTTP_1_0] is not supported in this set. Requests are initiated with `HTTP/1.1`. If * the server responds with `HTTP/1.0`, that will be exposed by [Response.protocol]. * * [alpn]: http://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg * [rfc_2616]: http://www.w3.org/Protocols/rfc2616/rfc2616.html
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 04:21:33 GMT 2024 - 52K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
private fun writeHttpResponse( socket: Socket, sink: BufferedSink, response: MockResponse, ) { sleepNanos(response.headersDelayNanos) sink.writeUtf8(response.status) sink.writeUtf8("\r\n") writeHeaders(sink, response.headers) val body = response.body ?: return sleepNanos(response.bodyDelayNanos) val responseBodySink = sink.withThrottlingAndSocketPolicy(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 37.4K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicLoomTest.kt
.withQueryStringParameter("name", "peter"), ) .respond(response().withBody("Peter the person!")) val results = (1..20).map { executor.submit { val response = client.newCall(Request((mockServer.secureEndpoint + "/person?name=peter").toHttpUrl())).execute() val body = response.body.string() assertThat(body).contains("Peter the person")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 11:15:46 GMT 2024 - 3.7K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/SocksProxyTest.kt
.withQueryStringParameter("name", "peter"), ) .respond(response().withBody("Peter the person!")) val client = OkHttpClient.Builder() .proxy(Proxy(SOCKS, InetSocketAddress(socks5Proxy.host, socks5Proxy.firstMappedPort))) .build() val response = client.newCall( Request("http://mockserver:1080/person?name=peter".toHttpUrl()),
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.6K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
@Test fun testOkHttpDirect() { testRequest { val client = OkHttpClient() val response = client.newCall( Request((mockServer.endpoint + "/person?name=peter").toHttpUrl()), ).execute() assertThat(response.body.string()).contains("Peter the person") assertThat(response.protocol).isEqualTo(Protocol.HTTP_1_1) } } @Test fun testOkHttpProxied() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 5.9K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt
/** Close connection after writing half of the response body (if present). */ object DisconnectDuringResponseBody : SocketPolicy /** * Process the response without even attempting to reading the request body. For HTTP/2 this will * send [http2ErrorCode] after the response body or trailers. For HTTP/1 this will close the * socket after the response body or trailers. */ class DoNotReadRequestBody(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt
} @Throws(IOException::class) internal fun checkUpgradeSuccess( response: Response, exchange: Exchange?, ) { if (response.code != 101) { throw ProtocolException( "Expected HTTP 101 response but was '${response.code} ${response.message}'", ) } val headerConnection = response.header("Connection") if (!"Upgrade".equals(headerConnection, ignoreCase = true)) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 01 14:21:25 GMT 2024 - 22.1K bytes - Viewed (0)