Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for getResponseCode (0.08 sec)

  1. src/test/java/jcifs/http/NtlmHttpURLConnectionTest.java

            mockResponse(HTTP_OK, "OK", null, null);
    
            // Act & Assert
            assertDoesNotThrow(() -> spiedConnection.getResponseCode());
            // Use reflection to verify handshake method is called
            assertDoesNotThrow(() -> spiedConnection.getResponseCode());
            assertDoesNotThrow(() -> spiedConnection.getInputStream());
        }
    
        /**
         * Test a successful NTLM authentication handshake.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  2. 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)
  3. src/main/java/jcifs/smb1/http/NtlmHttpURLConnection.java

        public String getRequestMethod() {
            return connection.getRequestMethod();
        }
    
        @Override
        public int getResponseCode() throws IOException {
            try {
                handshake();
            } catch (final IOException ex) {}
            return connection.getResponseCode();
        }
    
        @Override
        public String getResponseMessage() throws IOException {
            try {
                handshake();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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();
            return this.connection.getResponseMessage();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 25.6K bytes
    - Viewed (0)
Back to top