- Sort Score
- Result 10 results
- Languages All
Results 361 - 370 of 1,560 for respond (0.13 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/AsynchronousGet.kt
override fun onResponse( call: Call, response: Response, ) { response.use { if (!response.isSuccessful) throw IOException("Unexpected code $response") for ((name, value) in response.headers) { println("$name: $value") } println(response.body.string()) } } }, ) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py
client = TestClient(app, root_path="/api/v1") def test_main(): response = client.get("/app") assert response.status_code == 200 assert response.json() == {"message": "Hello World", "root_path": "/api/v1"} def test_openapi(): response = client.get("/openapi.json") assert response.status_code == 200 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 - 1K bytes - Viewed (0) -
android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt
e: IOException, ) { println("failed: $e") } override fun onResponse( call: Call, response: Response, ) { println("response: ${response.code}") response.close() } }, ) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AccessHeaders.kt
.build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") println("Server: ${response.header("Server")}") println("Date: ${response.header("Date")}") println("Vary: ${response.headers("Vary")}") } } } fun main() { AccessHeaders().run()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_first_steps/test_tutorial001.py
], ) def test_get_path(path, expected_status, expected_response): response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200 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) -
tests/test_response_class_no_mediatype.py
response_class=Response, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass # pragma: no cover @app.get("/b", responses={500: {"description": "Error", "model": Error}}) async def b(): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.3K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
val call = client.newCall(request) val response = Response.Builder().request(request).code(200).message("").protocol(Protocol.HTTP_2) .build() val listener = loggingEventListenerFactory.create(call) listener.cacheConditionalHit(call, response) listener.cacheHit(call, response) listener.cacheMiss(call) listener.satisfactionFailure(call, response) logRecorder
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 10.2K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/RtmSession.java
webSocket = slackApi.rtm(rtmStartResponse.url, this); } // TODO(jwilson): can I read the response body? Do I have to? // the body from slack is a 0-byte-buffer @Override public synchronized void onOpen(WebSocket webSocket, Response response) { System.out.println("onOpen: " + response); } // TOOD(jwilson): decode incoming messages and dispatch them somewhere.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Nov 19 20:16:58 UTC 2016 - 2.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
def test_no_token(): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): access_token = get_access_token(scope="me") response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/goals/ConfiguredGoalSupport.java
SecDispatcher.ValidationResponse response = secDispatcher.validateConfiguration(); if (!response.isValid() || context.invokerRequest.options().verbose().orElse(false)) { dumpResponse(context, "", response); } return response.isValid(); } protected void dumpResponse(
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 4.6K bytes - Viewed (0)