Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for enqueueRequestCookies (0.11 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingCookieJar.kt

    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)
  2. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        val cookieJar = RecordingCookieJar()
        val requestCookie =
          Cookie.Builder()
            .name("a")
            .value("b")
            .domain(server.hostName)
            .build()
        cookieJar.enqueueRequestCookies(requestCookie)
        client =
          client.newBuilder()
            .cookieJar(cookieJar)
            .build()
        server.enqueue(MockResponse())
        val call = client.newCall(Request(server.url("/")))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CallTest.kt

      }
    
      @Test
      fun requestCookies() {
        server.enqueue(MockResponse())
        val cookieJar = RecordingCookieJar()
        cookieJar.enqueueRequestCookies(
          Cookie.Builder().name("a").value("b").domain(server.hostName).build(),
          Cookie.Builder().name("c").value("d").domain(server.hostName).build(),
        )
        client =
          client.newBuilder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top