- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for setResponseCode (0.08 sec)
-
mockwebserver/README.md
case "/v1/login/auth/": return new MockResponse().setResponseCode(200); case "/v1/check/version/": return new MockResponse().setResponseCode(200).setBody("version=9"); case "/v1/profile/info": return new MockResponse().setResponseCode(200).setBody("{\\\"info\\\":{\\\"name\":\"Lucas Albuquerque\",\"age\":\"21\",\"gender\":\"male\"}}"); }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 5K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
var settings: Settings = Settings() private set var webSocketListener: WebSocketListener? = null private set val pushPromises: List<PushPromise> get() = promises init { setResponseCode(200) setHeader("Content-Length", 0L) } public override fun clone(): MockResponse { val result = super.clone() as MockResponse result.headersBuilder = headersBuilder.build().newBuilder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
val handshakeCertificates = TlsUtil.localhost() val server = MockWebServer().apply { useHttps(handshakeCertificates.sslSocketFactory(), false) enqueue( MockResponse() .setResponseCode(HTTP_MOVED_TEMP) .setHeader("Location", "https://www.google.com/robots.txt"), ) } val clientCertificates = HandshakeCertificates.Builder() .addPlatformTrustedCertificates()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
fun mockResponse() { var mockResponse: MockResponse = MockResponse() var status: String = mockResponse.status status = mockResponse.status mockResponse.status = "" mockResponse = mockResponse.setResponseCode(0) var headers: Headers = mockResponse.headers var trailers: Headers = mockResponse.trailers mockResponse = mockResponse.clearHeaders() mockResponse = mockResponse.addHeader("")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
"Informational", "OK", "Redirection", "Client Error", "Server Error", "Mock Response", ) for (i in 0..599) { val response = MockResponse().setResponseCode(i) val expectedReason = reasons[i / 100] assertThat(response.status).isEqualTo("HTTP/1.1 $i $expectedReason") assertThat(headersToList(response)).containsExactly("Content-Length: 0") } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
mockwebserver-deprecated/api/mockwebserver.api
public final fun setHeadersDelay (JLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/MockResponse; public final fun setHttp2ErrorCode (I)Lokhttp3/mockwebserver/MockResponse; public final fun setResponseCode (I)Lokhttp3/mockwebserver/MockResponse; public final fun setSocketPolicy (Lokhttp3/mockwebserver/SocketPolicy;)Lokhttp3/mockwebserver/MockResponse; public final fun setStatus (Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 22 12:28:51 UTC 2023 - 10.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
fun mockResponse() { var mockResponse: MockResponse = MockResponse() var status: String = mockResponse.status status = mockResponse.status mockResponse.status = "" mockResponse = mockResponse.setResponseCode(0) var headers: Headers = mockResponse.headers var trailers: Headers = mockResponse.trailers mockResponse = mockResponse.clearHeaders() mockResponse = mockResponse.addHeader("")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0)