- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for getResponseCode (0.18 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
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 21.9K 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) {
Java - Registered: Thu Apr 25 15:34:08 GMT 2024 - Last Modified: Sun Feb 12 12:21:25 GMT 2023 - 12.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
Java - Registered: Thu Apr 25 15:34:08 GMT 2024 - Last Modified: Mon Nov 14 21:05:19 GMT 2022 - 3.4K bytes - Viewed (0) -
src/main/java/jcifs/smb1/http/NtlmHttpURLConnection.java
} public String getRequestMethod() { return connection.getRequestMethod(); } public int getResponseCode() throws IOException { try { handshake(); } catch (IOException ex) { } return connection.getResponseCode(); } public String getResponseMessage() throws IOException { try { handshake();
Java - Registered: Sun Apr 28 00:10:09 GMT 2024 - Last Modified: Fri Mar 22 20:39:42 GMT 2019 - 20.4K bytes - Viewed (0) -
src/main/java/jcifs/http/NtlmHttpURLConnection.java
@Override public String getRequestMethod () { return this.connection.getRequestMethod(); } @Override public int getResponseCode () throws IOException { handshake(); return this.connection.getResponseCode(); } @Override public String getResponseMessage () throws IOException { handshake();
Java - Registered: Sun Apr 28 00:10:09 GMT 2024 - Last Modified: Sun Jul 01 13:12:10 GMT 2018 - 25.5K bytes - Viewed (0)