- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for getResponseCode (0.05 sec)
-
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
val url = server.url("/").toUrl() val connection = url.openConnection() as HttpURLConnection assertThat(connection.getResponseCode()).isEqualTo(HttpURLConnection.HTTP_OK) val refusedConnection = url.openConnection() as HttpURLConnection assertFailsWith<ConnectException> { refusedConnection.getResponseCode() }.also { expected -> assertThat(expected.message!!).contains("refused") } } @Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 03 13:16:34 UTC 2025 - 22.3K bytes - Viewed (0) -
src/test/java/org/codelibs/curl/io/IOIntegrationTest.java
return false; } @Override public void connect() throws IOException { // Do Nothing } @Override public int getResponseCode() throws IOException { return 200; } @Override public InputStream getInputStream() throws IOException { return new ByteArrayInputStream(new byte[100]); // dummy payload
Registered: Thu Sep 04 15:34:10 UTC 2025 - Last Modified: Sat May 10 01:44:04 UTC 2025 - 3.4K bytes - Viewed (0) -
src/main/java/org/codelibs/curl/CurlRequest.java
response.setHttpStatusCode(con.getResponseCode()); response.setHeaders(con.getHeaderFields()); } catch (final Exception e) { throw new CurlException("Failed to access the response.", e); } writeContent(() -> { try { if (con.getResponseCode() < 400) {
Registered: Thu Sep 04 15:34:10 UTC 2025 - Last Modified: Sat Jul 05 01:38:18 UTC 2025 - 17.8K bytes - Viewed (0)