- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 48 for status (0.18 sec)
-
mockwebserver/README.md
} ``` Your unit tests might move the `server` into a field so you can shut it down from your test's `tearDown()`. ### API #### MockResponse Mock responses default to an empty response body and a `200` status code. You can set a custom body with a string, input stream or byte array. Also add headers with a fluent builder API. ```java MockResponse response = new MockResponse()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 17 15:34:10 GMT 2023 - 5K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
server.enqueue( MockResponse.Builder() .status("HTP/1.1 200 OK") .build(), ) val request = newRequest("/") assertFailsWith<IOException> { getResponse(request) } } @Test fun serverSendsInvalidCodeTooLarge() { server.enqueue( MockResponse.Builder() .status("HTTP/1.1 2147483648 OK") .build(), )
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0) -
docs/changelogs/changelog_4x.md
## Version 4.6.0 _2020-04-28_ * Fix: Follow HTTP 307 and 308 redirects on methods other than GET and POST. We're reluctant to change OkHttp's behavior in handling common HTTP status codes, but this fix is overdue! The new behavior is now consistent with [RFC 7231][rfc_7231_647], which is newer than OkHttp itself. If you want this update with the old behavior use [this interceptor][legacy_interceptor].
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
/** Returns the HTTP response line, such as "HTTP/1.1 200 OK". */ val status: String val code: Int get() { val statusParts = status.split(' ', limit = 3) require(statusParts.size >= 2) { "Unexpected status: $status" } return statusParts[1].toInt() } val message: String get() { val statusParts = status.split(' ', limit = 3)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 13.3K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/http/StatusLine.kt
throw ProtocolException("Unexpected status line: $statusLine") } val httpMinorVersion = statusLine[7] - '0' codeStart = 9 protocol = when (httpMinorVersion) { 0 -> Protocol.HTTP_1_0 1 -> Protocol.HTTP_1_1 else -> throw ProtocolException("Unexpected status line: $statusLine") }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 09 12:33:05 GMT 2024 - 3.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Header.kt
@JvmField val PSEUDO_PREFIX: ByteString = ":".encodeUtf8() const val RESPONSE_STATUS_UTF8 = ":status" const val TARGET_METHOD_UTF8 = ":method" const val TARGET_PATH_UTF8 = ":path" const val TARGET_SCHEME_UTF8 = ":scheme" const val TARGET_AUTHORITY_UTF8 = ":authority" @JvmField val RESPONSE_STATUS: ByteString = RESPONSE_STATUS_UTF8.encodeUtf8()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
server.shutdown() } @Test fun defaultMockResponse() { val response = MockResponse() assertThat(headersToList(response)).containsExactly("Content-Length: 0") assertThat(response.status).isEqualTo("HTTP/1.1 200 OK") } @Test fun setResponseMockReason() { val reasons = arrayOf( "Mock Response", "Informational", "OK", "Redirection",
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 21.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
} @JvmName("-deprecated_getStatus") @Deprecated( message = "moved to var", replaceWith = ReplaceWith(expression = "status"), level = DeprecationLevel.ERROR, ) fun getStatus(): String = status fun setStatus(status: String) = apply { this.status = status } fun setResponseCode(code: Int): MockResponse { val reason = when (code) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Response.kt
/** Returns the HTTP protocol, such as [Protocol.HTTP_1_1] or [Protocol.HTTP_1_0]. */ @get:JvmName("protocol") val protocol: Protocol, /** Returns the HTTP status message. */ @get:JvmName("message") val message: String, /** Returns the HTTP status code. */ @get:JvmName("code") val code: Int, /** * Returns the TLS handshake of the connection that carried this response, or null if the
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 23 14:31:42 GMT 2024 - 15.5K bytes - Viewed (0) -
native-image-tests/src/main/kotlin/okhttp3/DotListener.kt
testExecutionResult: TestExecutionResult, ) { if (!testIdentifier.isContainer) { when (testExecutionResult.status!!) { TestExecutionResult.Status.ABORTED -> printStatus("-") TestExecutionResult.Status.FAILED -> printStatus("F") TestExecutionResult.Status.SUCCESSFUL -> printStatus(".") } } } override fun testPlanExecutionFinished(testPlan: TestPlan) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.2K bytes - Viewed (0)