- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 224 for isSuccessful (0.06 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: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 47.8K 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: Sun Sep 21 03:50:09 UTC 2025 - Last Modified: Thu Aug 07 02:55:08 UTC 2025 - 12.5K 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: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 6.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/UploadProgress.kt
.url("https://api.imgur.com/3/image") .post(ProgressRequestBody(requestBody, progressListener)) .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") println(response.body.string()) } } private class ProgressRequestBody( private val delegate: RequestBody,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 3.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt
val request = Request .Builder() .url("https://prod.idrix.eu/secure/") .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") println(response.body.string()) } } } object ConsoleCallbackHandler : CallbackHandler { override fun handle(callbacks: Array<Callback>) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 4.2K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt
override fun onResponse( call: Call, response: Response, ) { processResponse(response) } internal fun processResponse(response: Response) { response.use { if (!response.isSuccessful) { listener.onFailure(this, null, response) return } val body = response.body if (!body.isEventStream()) { listener.onFailure( this,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 3.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java
.url("https://www.googleapis.com/urlshortener/v1/url?key=" + GOOGLE_API_KEY) .post(jsonRequestBody) .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 {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 3.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/UploadProgress.java
.url("https://api.imgur.com/3/image") .post(new ProgressRequestBody(requestBody, progressListener)) .build(); 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 UploadProgress().run(); }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 4.2K bytes - Viewed (1) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
) fun code(): Int = code /** * Returns true if the code is in [200..300), which means the request was successfully received, * understood, and accepted. */ val isSuccessful: Boolean = code in 200..299 @JvmName("-deprecated_message") @Deprecated( message = "moved to val", replaceWith = ReplaceWith(expression = "message"), level = DeprecationLevel.ERROR, )
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 14:39:28 UTC 2025 - 18.1K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt
Platform.get().log("Incorrect protocol: ${response.protocol}", Platform.WARN) } response.use { if (!response.isSuccessful) { throw IOException("response: " + response.code + " " + response.message) } val body = response.body if (body.contentLength() > MAX_RESPONSE_SIZE) { throw IOException(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 8.6K bytes - Viewed (0)