Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for saveFromResponse (0.11 sec)

  1. okhttp/src/main/kotlin/okhttp3/CookieJar.kt

       * Note that this method may be called a second time for a single HTTP response if the response
       * includes a trailer. For this obscure HTTP feature, [cookies] contains only the trailer's
       * cookies.
       */
      fun saveFromResponse(
        url: HttpUrl,
        cookies: List<Cookie>,
      )
    
      /**
       * Load cookies from the jar for an HTTP request to [url]. This method returns a possibly
       * empty list of cookies for the network request.
       *
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. okhttp-java-net-cookiejar/api/okhttp-java-net-cookiejar.api

    public final class okhttp3/java/net/cookiejar/JavaNetCookieJar : okhttp3/CookieJar {
    	public fun <init> (Ljava/net/CookieHandler;)V
    	public fun loadForRequest (Lokhttp3/HttpUrl;)Ljava/util/List;
    	public fun saveFromResponse (Lokhttp3/HttpUrl;Ljava/util/List;)V
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Nov 20 16:20:29 UTC 2023
    - 264 bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CookiesTest.kt

        val cookieManager = CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER)
        val cookieJar = JavaNetCookieJar(cookieManager)
        val url = "https://www.squareup.com/".toHttpUrl()
        cookieJar.saveFromResponse(url, listOf(parse(url, "a=android; Domain=squareup.com")!!))
        val actualCookies = cookieJar.loadForRequest(url)
        assertThat(actualCookies.size).isEqualTo(1)
        assertThat(actualCookies[0].name).isEqualTo("a")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13K bytes
    - Viewed (0)
  4. okhttp-urlconnection/api/okhttp-urlconnection.api

    }
    
    public final class okhttp3/JavaNetCookieJar : okhttp3/CookieJar {
    	public fun <init> (Ljava/net/CookieHandler;)V
    	public fun loadForRequest (Lokhttp3/HttpUrl;)Ljava/util/List;
    	public fun saveFromResponse (Lokhttp3/HttpUrl;Ljava/util/List;)V
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Feb 26 19:17:33 UTC 2022
    - 423 bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingCookieJar.kt

        return responseCookies.removeFirst()
      }
    
      fun assertResponseCookies(vararg cookies: String?) {
        assertThat(takeResponseCookies().map(Cookie::toString)).containsExactly(*cookies)
      }
    
      override fun saveFromResponse(
        url: HttpUrl,
        cookies: List<Cookie>,
      ) {
        responseCookies.add(cookies)
      }
    
      override fun loadForRequest(url: HttpUrl): List<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)
  6. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

    fun CookieJar.receiveHeaders(
      url: HttpUrl,
      headers: Headers,
    ) {
      if (this === CookieJar.NO_COOKIES) return
    
      val cookies = Cookie.parseAll(url, headers)
      if (cookies.isEmpty()) return
    
      saveFromResponse(url, cookies)
    }
    
    /**
     * Returns true if the response headers and status indicate that this response has a (possibly
     * 0-length) body. See RFC 7231.
     */
    fun Response.promisesBody(): Boolean {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  7. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

    import okhttp3.internal.trimSubstring
    
    /** A cookie jar that delegates to a [java.net.CookieHandler]. */
    class JavaNetCookieJar(private val cookieHandler: CookieHandler) : CookieJar {
      override fun saveFromResponse(
        url: HttpUrl,
        cookies: List<Cookie>,
      ) {
        val cookieStrings = mutableListOf<String>()
        for (cookie in cookies) {
          cookieStrings.add(cookieToString(cookie, true))
        }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:10:43 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        builder = builder.sameSite("None")
        val cookie: Cookie = builder.build()
      }
    
      @Test
      fun cookieJar() {
        val cookieJar =
          object : CookieJar {
            override fun saveFromResponse(
              url: HttpUrl,
              cookies: List<Cookie>,
            ) = TODO()
    
            override fun loadForRequest(url: HttpUrl): List<Cookie> = TODO()
          }
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  9. okhttp/api/okhttp.api

    	public static final field Companion Lokhttp3/CookieJar$Companion;
    	public static final field NO_COOKIES Lokhttp3/CookieJar;
    	public abstract fun loadForRequest (Lokhttp3/HttpUrl;)Ljava/util/List;
    	public abstract fun saveFromResponse (Lokhttp3/HttpUrl;Ljava/util/List;)V
    }
    
    public final class okhttp3/CookieJar$Companion {
    }
    
    public final class okhttp3/Credentials {
    	public static final field INSTANCE Lokhttp3/Credentials;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 70.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      }
    
      @Test
      fun disconnectDuringConnect_cookieJar() {
        val callReference = AtomicReference<Call>()
    
        class DisconnectingCookieJar : CookieJar {
          override fun saveFromResponse(
            url: HttpUrl,
            cookies: List<Cookie>,
          ) {}
    
          override fun loadForRequest(url: HttpUrl): List<Cookie> {
            callReference.get().cancel()
            return emptyList()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
Back to top