Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for RecordingCookieJar (0.15 sec)

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

     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.containsExactly
    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) {
    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

    import okhttp3.Interceptor
    import okhttp3.MediaType
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.OkHttpClient
    import okhttp3.OkHttpClientTestRule
    import okhttp3.Protocol
    import okhttp3.RecordingCookieJar
    import okhttp3.RecordingHostnameVerifier
    import okhttp3.Request
    import okhttp3.RequestBody
    import okhttp3.Response
    import okhttp3.Route
    import okhttp3.SimpleProvider
    import okhttp3.TestLogHandler
    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

                "Set-Cookie",
                "c=d; Expires=Fri, 02 Jan 1970 23:59:59 GMT; path=/bar; secure",
              ),
          ),
        )
        val cookieJar = RecordingCookieJar()
        client =
          client.newBuilder()
            .cookieJar(cookieJar)
            .build()
        executeSynchronously("/").assertCode(200)
        val responseCookies = cookieJar.takeResponseCookies()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CacheTest.kt

            .build()
        val response2 = client.newCall(request2).execute()
        assertThat(response2.body.string()).isEqualTo("A")
      }
    
      @Test
      fun cachePlusCookies() {
        val cookieJar = RecordingCookieJar()
        client =
          client.newBuilder()
            .cookieJar(cookieJar)
            .build()
        server.enqueue(
          MockResponse.Builder()
            .addHeader("Set-Cookie: a=FIRST")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
Back to top