- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 737 for isSuccessful (0.04 sec)
-
docs/recipes.md
val request = Request.Builder() .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()) }
Registered: 2025-12-26 11:42 - Last Modified: 2025-08-30 17:01 - 47.8K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/processor/impl/DefaultResponseProcessorTest.java
assertTrue(processor.isSuccessful(responseData)); responseData.setHttpStatusCode(100); assertFalse(processor.isSuccessful(responseData)); responseData.setHttpStatusCode(304); assertFalse(processor.isSuccessful(responseData)); responseData.setHttpStatusCode(404); assertFalse(processor.isSuccessful(responseData)); }
Registered: 2025-12-20 11:21 - Last Modified: 2025-03-15 06:52 - 2.3K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt
.url("/") .newBuilder() .host("localhost.localdomain") .build() val call = client.newCall(Request(url = url)) val response = call.execute() assertThat(response.isSuccessful).isTrue() val recordedRequest = server.takeRequest() // https://github.com/bcgit/bc-java/issues/1773 if (!platform.isBouncyCastle()) {
Registered: 2025-12-26 11:42 - Last Modified: 2025-06-18 12:28 - 6.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt
val request = Request .Builder() .url("http://publicobject.com/helloworld.txt") .build() val response1Body = client.newCall(request).execute().use { if (!it.isSuccessful) throw IOException("Unexpected code $it") println("Response 1 response: $it") println("Response 1 cache response: ${it.cacheResponse}")Registered: 2025-12-26 11:42 - Last Modified: 2025-03-19 19:25 - 2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java
.url("http://publicobject.com/helloworld.txt") .build(); String response1Body; try (Response response1 = client.newCall(request).execute()) { if (!response1.isSuccessful()) throw new IOException("Unexpected code " + response1); response1Body = response1.body().string(); System.out.println("Response 1 response: " + response1);
Registered: 2025-12-26 11:42 - Last Modified: 2016-05-22 01:29 - 2.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt
} fun assertSuccessful() = apply { assertThat(failure).isNull() assertThat(response!!.isSuccessful).isTrue() } fun assertNotSuccessful() = apply { assertThat(response!!.isSuccessful).isFalse() } fun assertHeader( name: String, vararg values: String?, ) = apply {
Registered: 2025-12-26 11:42 - Last Modified: 2024-12-27 13:39 - 5.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AsynchronousGet.kt
) { e.printStackTrace() } 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: 2025-12-26 11:42 - Last Modified: 2025-03-19 19:25 - 1.6K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/processor/impl/DefaultResponseProcessor.java
} /** * Gets the successful HTTP codes. * * @return the successful HTTP codes */ public int[] getSuccessfulHttpCodes() { return successfulHttpCodes; } /** * Sets the successful HTTP codes. * * @param successfulHttpCodes the successful HTTP codes to set */Registered: 2025-12-20 11:21 - Last Modified: 2025-08-07 02:55 - 12.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
Registered: 2025-12-26 11:42 - Last Modified: 2025-03-19 19:25 - 1.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt
val request = Request .Builder() .url("https://api.github.com/gists/c2a7c39532239ff261be") .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") val gist = gistJsonAdapter.fromJson(response.body!!.source()) for ((key, value) in gist!!.files!!) { println(key) println(value.content)Registered: 2025-12-26 11:42 - Last Modified: 2025-03-19 19:25 - 1.6K bytes - Viewed (0)