- Sort Score
- Result 10 results
- Languages All
Results 521 - 530 of 1,560 for respond (0.16 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt
@Throws(IOException::class) override fun authenticate( route: Route?, response: Response, ): Request? { val challenges = response.challenges() val request = response.request val url = request.url val proxyAuthorization = response.code == 407 val proxy = route?.proxy ?: Proxy.NO_PROXY for (challenge in challenges) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.2K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt
connect(callFactory) } } } @JvmStatic fun processResponse( response: Response, listener: EventSourceListener, ) { val eventSource = RealEventSource(response.request, listener) eventSource.processResponse(response) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:18:15 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ExternalHttp2Example.kt
.url("https://www.google.ca/") .build(), ) val response = call.execute() try { println(response.code) println("PROTOCOL ${response.protocol}") var line: String? while (response.body.source().readUtf8Line().also { line = it } != null) { println(line) } } finally { response.body.close() } client.connectionPool.evictAll() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp-brotli/src/main/kotlin/okhttp3/brotli/BrotliInterceptor.kt
object BrotliInterceptor : Interceptor { override fun intercept(chain: Interceptor.Chain): Response { return if (chain.request().header("Accept-Encoding") == null) { val request = chain.request().newBuilder() .header("Accept-Encoding", "br,gzip") .build() val response = chain.proceed(request) uncompress(response) } else { chain.proceed(chain.request()) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/OkHttpClientTest.java
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Nov 14 17:38:22 UTC 2020 - 1.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
.url("https://api.github.com/markdown/raw") .post(requestBody) .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } } public static void main(String... args) throws Exception { new PostStreaming().run(); }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
writeTimeoutMillis = client.writeTimeoutMillis, ) var calledNoMoreExchanges = false try { val response = chain.proceed(originalRequest) if (isCanceled()) { response.closeQuietly() throw IOException("Canceled") } return response } catch (e: IOException) { calledNoMoreExchanges = true throw noMoreExchanges(e) as Throwable } finally {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 17.9K bytes - Viewed (0) -
tests/test_additional_response_extra.py
app.include_router(router) client = TestClient(app) def test_path_operation(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == {"id": "foo"} def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/SynchronousGet.kt
.url("https://publicobject.com/helloworld.txt") .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") for ((name, value) in response.headers) { println("$name: $value") } println(response.body.string()) } } } fun main() { SynchronousGet().run()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_route_scope.py
client = TestClient(app) def test_get(): response = client.get("/users/rick") assert response.status_code == 200, response.text assert response.json() == {"user_id": "rick", "path": "/users/{user_id}"} def test_invalid_method_doesnt_match(): response = client.post("/users/rick") assert response.status_code == 405, response.text def test_invalid_path_doesnt_match():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Feb 08 10:23:07 UTC 2023 - 1.5K bytes - Viewed (0)