- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for clearHeaders (0.09 sec)
-
okhttp/src/test/java/okhttp3/DuplexTest.kt
.receiveRequest("request E\n") .sendResponse("response F\n") .exhaustRequest() .exhaustResponse() server.enqueue( MockResponse.Builder() .clearHeaders() .streamHandler(body) .build(), ) val call = client.newCall( Request.Builder() .url(server.url("/")) .post(AsyncRequestBody())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
val response = MockResponse() .clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie", "a=android") assertThat(headersToList(response)) .containsExactly("Cookie: s=square", "Cookie: a=android") } @Test fun mockResponseSetHeader() { val response = MockResponse() .clearHeaders() .addHeader("Cookie: s=square")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
val builder = MockResponse.Builder() .clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie", "a=android") assertThat(headersToList(builder)).containsExactly("Cookie: s=square", "Cookie: a=android") } @Test fun mockResponseSetHeader() { val builder = MockResponse.Builder() .clearHeaders() .addHeader("Cookie: s=square")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.5K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
mockResponse.status = "" mockResponse = mockResponse.setResponseCode(0) var headers: Headers = mockResponse.headers var trailers: Headers = mockResponse.trailers mockResponse = mockResponse.clearHeaders() mockResponse = mockResponse.addHeader("") mockResponse = mockResponse.addHeader("", "") mockResponse = mockResponse.addHeaderLenient("", Any()) mockResponse = mockResponse.setHeader("", Any())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
in 400..499 -> "Client Error" in 500..599 -> "Server Error" else -> "Mock Response" } return apply { status = "HTTP/1.1 $code $reason" } } fun clearHeaders() = apply { headersBuilder = Headers.Builder() } fun addHeader(header: String) = apply { headersBuilder.add(header) } fun addHeader( name: String,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
.body("5;x\r\nABCDE\r\n0\r\n\r\n") .clearHeaders() .addHeader("Transfer-encoding: chunked") .build(), ) getResponse(newRequest("/")).use { response -> assertContent("ABCDE", response) } } @Test fun missingChunkBody() { server.enqueue( MockResponse.Builder() .body("5") .clearHeaders() .addHeader("Transfer-encoding: chunked")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
this.status = status } /** * Removes all HTTP headers including any "Content-Length" and "Transfer-encoding" headers that * were added by default. */ fun clearHeaders() = apply { headers = Headers.Builder() } /** * Adds [header] as an HTTP header. For well-formed HTTP [header] should contain a name followed * by a colon and a value.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt
assertConnectionNotReused(requestA, requestB) } @Test fun connectionsAreNotReusedWithUnknownLengthResponseBody() { server.enqueue( MockResponse.Builder() .body("a") .clearHeaders() .socketPolicy(DisconnectAtEnd) .build(), ) server.enqueue(MockResponse(body = "b")) val request = Request(server.url("/")) assertConnectionNotReused(request, request) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 12.3K bytes - Viewed (0) -
mockwebserver-deprecated/api/mockwebserver.api
public final fun addHeader (Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse; public final fun addHeaderLenient (Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse; public final fun clearHeaders ()Lokhttp3/mockwebserver/MockResponse; public synthetic fun clone ()Ljava/lang/Object; public fun clone ()Lokhttp3/mockwebserver/MockResponse; public final fun getBody ()Lokio/Buffer;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 22 12:28:51 UTC 2023 - 10.2K bytes - Viewed (0)