- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for requestCookies (0.08 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingCookieJar.kt
import java.util.ArrayDeque import java.util.Deque class RecordingCookieJar : CookieJar { private val requestCookies: Deque<List<Cookie>> = ArrayDeque() private val responseCookies: Deque<List<Cookie>> = ArrayDeque() fun enqueueRequestCookies(vararg cookies: Cookie) { requestCookies.add(cookies.toList()) } fun takeResponseCookies(): List<Cookie> { return responseCookies.removeFirst() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
assertThat(responseCookies[1].toString()) .isEqualTo("c=d; expires=Fri, 02 Jan 1970 23:59:59 GMT; path=/bar; secure") } @Test fun requestCookies() { server.enqueue(MockResponse()) val cookieJar = RecordingCookieJar() cookieJar.enqueueRequestCookies( Cookie.Builder().name("a").value("b").domain(server.hostName).build(),
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/internal/http2/HttpOverHttp2Test.kt
mockWebServer: MockWebServer, ) { setUp(protocol, mockWebServer) val cookieJar = RecordingCookieJar() val requestCookie = Cookie.Builder() .name("a") .value("b") .domain(server.hostName) .build() cookieJar.enqueueRequestCookies(requestCookie) client = client.newBuilder() .cookieJar(cookieJar) .build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 75.3K bytes - Viewed (0)