- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 270 for Cookie (0.1 sec)
-
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: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_param_models/test_tutorial002.py
"loc": ["cookie", "session_id"], "msg": "field required", } ] } ) ) def test_cookie_param_model_extra(client: TestClient): with client as c: c.cookies.set("session_id", "123") c.cookies.set("extra", "track-me-here-too") response = c.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 8.6K bytes - Viewed (0) -
tests/test_params_repr.py
def test_cookie_repr_str(): assert repr(Cookie("teststr")) == "Cookie(teststr)" def test_cookie_repr_none(): assert repr(Cookie(None)) == "Cookie(None)" def test_cookie_repr_ellipsis(): assert repr(Cookie(...)) == IsOneOf( "Cookie(PydanticUndefined)", # TODO: remove when deprecating Pydantic v1 "Cookie(Ellipsis)", ) def test_cookie_repr_number():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/CookieJar.kt
*/ fun loadForRequest(url: HttpUrl): List<Cookie> companion object { /** A cookie jar that never accepts any cookies. */ @JvmField val NO_COOKIES: CookieJar = NoCookies() private class NoCookies : CookieJar { override fun saveFromResponse( url: HttpUrl, cookies: List<Cookie>, ) { } 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 - 2.4K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/RoleQueryHelper.java
final Cookie[] cookies = request.getCookies(); if (cookies != null) { for (final Cookie cookie : cookies) { addRoleFromCookieMapping(roleSet, cookie); } } } protected void addRoleFromCookieMapping(final Set<String> roleNameList, final Cookie cookie) {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Jul 25 01:48:41 UTC 2024 - 11.5K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py
assert data == "Session cookie or query token value is: some-token" data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: bar" message = "Message two" websocket.send_text(message) data = websocket.receive_text() assert data == "Session cookie or query token value is: some-token"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
def cookie_example( data: Union[str, None] = Cookie( default=None, example="cookie1", ), ): return data @app.get("/cookie_examples/") def cookie_examples( data: Union[str, None] = Cookie( default=None, examples=["cookie1", "cookie2"], ), ): return data
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 37.7K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an.py
assert data == "Session cookie or query token value is: some-token" data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: bar" message = "Message two" websocket.send_text(message) data = websocket.receive_text() assert data == "Session cookie or query token value is: some-token"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.6K bytes - Viewed (0) -
docs/zh/docs/advanced/response-cookies.md
# 响应Cookies ## 使用 `Response` 参数 你可以在 *路径函数* 中定义一个类型为 `Response`的参数,这样你就可以在这个临时响应对象中设置cookie了。 ```Python hl_lines="1 8-9" {!../../docs_src/response_cookies/tutorial002.py!} ``` 而且你还可以根据你的需要响应不同的对象,比如常用的 `dict`,数据库model等。 如果你定义了 `response_model`,程序会自动根据`response_model`来过滤和转换你响应的对象。 **FastAPI** 会使用这个 *临时* 响应对象去装在这些cookies信息 (同样还有headers和状态码等信息), 最终会将这些信息和通过`response_model`转化过的数据合并到最终的响应里。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.1K bytes - Viewed (0) -
tests/test_repeated_cookie_headers.py
from fastapi import Depends, FastAPI, Response from fastapi.testclient import TestClient app = FastAPI() def set_cookie(*, response: Response): response.set_cookie("cookie-name", "cookie-value") return {} def set_indirect_cookie(*, dep: str = Depends(set_cookie)): return dep @app.get("/directCookie") def get_direct_cookie(dep: str = Depends(set_cookie)): return {"dep": dep}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jun 13 12:44:51 UTC 2020 - 792 bytes - Viewed (0)