- Sort Score
- Num 10 results
- Language All
Results 11 - 17 of 17 for followRedirects (0.16 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
} } private fun buildRedirectRequest( userResponse: Response, method: String, chain: Interceptor.Chain, ): Request? { // Does the client allow redirects? if (!chain.followRedirects) return null val location = userResponse.header("Location") ?: return null // Don't follow redirects to unsupported protocols. val url = userResponse.request.url.resolve(location) ?: return null
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 12.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt
* * Response header values like `Location` and `Retry-After` are also considered. * * Client configuration may be used to make follow-up decisions, such as: * * * [OkHttpClient.followRedirects] must be true to follow redirects. * * [OkHttpClient.followSslRedirects] must be true to follow redirects that add or remove HTTPS. * * [OkHttpClient.authenticator] must respond to an authorization challenge. *
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Oct 07 21:03:04 GMT 2025 - 24.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
headers = headersOf("Location", "/b"), body = "A", ), ) server.enqueue(MockResponse(body = "B")) client = client .newBuilder() .followRedirects(false) .build() executeSynchronously("/a") .assertBody("A") .assertCode(302) } @Test fun expect100ContinueNonEmptyRequestBody() { server.enqueue(
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:02:18 GMT 2026 - 146.5K bytes - Click Count (0) -
tests/test_router_redirect_slashes.py
return "Hello, World!" app.include_router(router) client = TestClient(app) response = client.get("/hello/", follow_redirects=False) assert response.status_code == 200 response = client.get("/hello", follow_redirects=False) assert response.status_code == 307 def test_redirect_slashes_disabled(): app = FastAPI(redirect_slashes=False) router = APIRouter()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Jun 22 10:37:50 GMT 2023 - 974 bytes - Click Count (0) -
tests/test_tutorial/test_advanced_middleware/test_tutorial001.py
client = TestClient(app, base_url="https://testserver") response = client.get("/") assert response.status_code == 200, response.text client = TestClient(app) response = client.get("/", follow_redirects=False) assert response.status_code == 307, response.text
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 480 bytes - Click Count (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial001_01.py
from fastapi.testclient import TestClient from docs_src.behind_a_proxy.tutorial001_01_py310 import app client = TestClient( app, base_url="https://example.com", follow_redirects=False, ) def test_redirect() -> None: response = client.get("/items") assert response.status_code == 307 assert response.headers["location"] == "https://example.com/items/" def test_no_redirect() -> None:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 545 bytes - Click Count (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt
info: UrlResponseInfo, newLocationUrl: String, ) { println("request " + info.httpStatusCode + " " + newLocationUrl) request.followRedirect() } override fun onResponseStarted( request: UrlRequest, info: UrlResponseInfo, ) {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 6.3K bytes - Click Count (0)