Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 333 for Cookies (0.11 sec)

  1. docs/ru/docs/tutorial/cookie-params.md

    Вы можете задать параметры Cookie таким же способом, как `Query` и `Path` параметры.
    
    ## Импорт `Cookie`
    
    Сначала импортируйте `Cookie`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/cookie_params/tutorial001.py!}
        ```
    
    ## Объявление параметров `Cookie`
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. src/net/http/cookiejar/jar.go

    }
    
    // Cookies implements the Cookies method of the [http.CookieJar] interface.
    //
    // It returns an empty slice if the URL's scheme is not HTTP or HTTPS.
    func (j *Jar) Cookies(u *url.URL) (cookies []*http.Cookie) {
    	return j.cookies(u, time.Now())
    }
    
    // cookies is like Cookies but takes the current time as a parameter.
    func (j *Jar) cookies(u *url.URL, now time.Time) (cookies []*http.Cookie) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 15K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_cookie_params/test_tutorial001.py

                200,
                {"ads_id": "ads_track"},
            ),
            ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}),
        ],
    )
    def test(path, cookies, expected_status, expected_response):
        client = TestClient(app, cookies=cookies)
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/BridgeInterceptor.kt

        }
    
        return responseBuilder.build()
      }
    
      /** Returns a 'Cookie' HTTP request header with all cookies, like `a=b; c=d`. */
      private fun cookieHeader(cookies: List<Cookie>): String =
        buildString {
          cookies.forEachIndexed { index, cookie ->
            if (index > 0) append("; ")
            append(cookie.name).append('=').append(cookie.value)
          }
        }
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. src/net/http/jar.go

    	SetCookies(u *url.URL, cookies []*Cookie)
    
    	// Cookies returns the cookies to send in a request for the given URL.
    	// It is up to the implementation to honor the standard cookie use
    	// restrictions such as in RFC 6265.
    	Cookies(u *url.URL) []*Cookie
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 900 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_cookie_params/test_tutorial001_an_py39.py

                {"ads_id": "ads_track"},
            ),
            ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}),
        ],
    )
    def test(path, cookies, expected_status, expected_response):
        from docs_src.cookie_params.tutorial001_an_py39 import app
    
        client = TestClient(app, cookies=cookies)
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_cookie_params/test_tutorial001_an_py310.py

                {"ads_id": "ads_track"},
            ),
            ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}),
        ],
    )
    def test(path, cookies, expected_status, expected_response):
        from docs_src.cookie_params.tutorial001_an_py310 import app
    
        client = TestClient(app, cookies=cookies)
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/Cookie.kt

        internal constructor(cookie: Cookie) : this() {
          this.name = cookie.name
          this.value = cookie.value
          this.expiresAt = cookie.expiresAt
          this.domain = cookie.domain
          this.path = cookie.path
          this.secure = cookie.secure
          this.httpOnly = cookie.httpOnly
          this.persistent = cookie.persistent
          this.hostOnly = cookie.hostOnly
          this.sameSite = cookie.sameSite
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 06 04:12:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. src/net/http/cookiejar/jar_test.go

    	now := tNow
    
    	// Populate jar with cookies.
    	setCookies := make([]*http.Cookie, len(test.setCookies))
    	for i, cs := range test.setCookies {
    		cookies := (&http.Response{Header: http.Header{"Set-Cookie": {cs}}}).Cookies()
    		if len(cookies) != 1 {
    			panic(fmt.Sprintf("Wrong cookie line %q: %#v", cs, cookies))
    		}
    		setCookies[i] = cookies[0]
    	}
    	jar.setCookies(mustParseURL(test.fromURL), setCookies, now)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 34K bytes
    - Viewed (0)
  10. src/net/http/cookie_test.go

    			cookies: []*Cookie{{Name: "Cookie-1", Value: "v$1"}},
    		},
    		{
    			line:    "Cookie-1=v$1;c2=v2",
    			cookies: []*Cookie{{Name: "Cookie-1", Value: "v$1"}, {Name: "c2", Value: "v2"}},
    		},
    		{
    			line:    `Cookie-1="v$1";c2="v2"`,
    			cookies: []*Cookie{{Name: "Cookie-1", Value: "v$1", Quoted: true}, {Name: "c2", Value: "v2", Quoted: true}},
    		},
    		{
    			line:    "k1=",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:33:05 UTC 2024
    - 26.2K bytes
    - Viewed (0)
Back to top