Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 213 for unexpectedly (0.06 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/internal/RecordedRequestFactory.kt

      val parts =
        when {
          requestLine != null -> requestLine.split(' ', limit = 3)
          else -> return DEFAULT_REQUEST_LINE_HTTP_1
        }
    
      if (parts.size != 3) {
        throw ProtocolException("unexpected request line: $requestLine")
      }
    
      return RequestLine(
        method = parts[0],
        target = parts[1],
        version = parts[2],
      )
    }
    
    internal class RequestLine(
      val method: String,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 12:43:16 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/PostString.kt

            body = postBody.toRequestBody(MEDIA_TYPE_MARKDOWN),
          )
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          println(response.body.string())
        }
      }
    
      companion object {
        val MEDIA_TYPE_MARKDOWN = "text/x-markdown; charset=utf-8".toMediaType()
      }
    }
    
    fun main() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/PostForm.kt

            url = "https://en.wikipedia.org/w/index.php".toHttpUrl(),
            body = formBody,
          )
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          println(response.body.string())
        }
      }
    }
    
    fun main() {
      PostForm().run()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/kt/SynchronousGet.kt

          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())
        }
      }
    }
    
    fun main() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

        get() {
          val statusParts = status.split(' ', limit = 3)
          require(statusParts.size >= 2) { "Unexpected status: $status" }
          return statusParts[1].toInt()
        }
    
      public val message: String
        get() {
          val statusParts = status.split(' ', limit = 3)
          require(statusParts.size >= 2) { "Unexpected status: $status" }
          return statusParts[2]
        }
    
      public val headers: Headers
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/kt/UploadProgress.kt

            .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,
        private val progressListener: ProgressListener,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/PostString.java

            .post(RequestBody.create(postBody, MEDIA_TYPE_MARKDOWN))
            .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 PostString().run();
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 25 18:02:55 UTC 2019
    - 1.7K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt

            .put(path.asRequestBody(fileSystem, MEDIA_TYPE_JSON))
            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          fileSystem.sink(path).use {
            response.body.source().readAll(it)
          }
    
          println(fileSystem.source(path).buffer().readUtf8())
        }
      }
    
      companion object {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

            .url("https://api.imgur.com/3/image")
            .post(requestBody)
            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          println(response.body.string())
        }
      }
    
      companion object {
        /**
         * The imgur client ID for OkHttp recipes. If you're using imgur for anything other than running
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/crawler/serializer/DataSerializer.java

            return switch (serializer) {
            case KRYO -> serializeWithKryo(obj);
            case JAVABIN -> SerializeUtil.fromObjectToBinary(obj);
            default -> throw new IllegalArgumentException("Unexpected value: " + serializer);
            };
        }
    
        /**
         * Deserializes a byte array back to an object.
         * <p>
         * The deserialization method used depends on the configured serializer type.
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 6.1K bytes
    - Viewed (0)
Back to top