- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for clearHeaders (0.06 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/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) -
mockwebserver/api/mockwebserver3.api
public final fun chunkedBody (Ljava/lang/String;I)Lmockwebserver3/MockResponse$Builder; public final fun chunkedBody (Lokio/Buffer;I)Lmockwebserver3/MockResponse$Builder; public final fun clearHeaders ()Lmockwebserver3/MockResponse$Builder; public synthetic fun clone ()Ljava/lang/Object; public fun clone ()Lmockwebserver3/MockResponse$Builder; public final fun code (I)Lmockwebserver3/MockResponse$Builder;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 03 21:59:45 UTC 2023 - 12.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/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 Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0)