Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for 404 (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/Callback.kt

       *
       * Note that transport-layer success (receiving a HTTP response code, headers and body) does not
       * necessarily indicate application-layer success: `response` may still indicate an unhappy HTTP
       * response code like 404 or 500.
       */
      @Throws(IOException::class)
      fun onResponse(
        call: Call,
        response: Response,
      )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

        Request request = new Request.Builder()
                .url(url)
                .build();
        try (Response response = client.newCall(request).execute()) {
          assertTrue(response.code() == 200 || response.code() == 404);
          assertEquals(Protocol.HTTP_2, response.protocol());
    
          for (Certificate c: response.handshake().peerCertificates()) {
            X509Certificate x = (X509Certificate) c;
            System.out.println(x.getSubjectDN());
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  3. mockwebserver/README.md

                    return new MockResponse().setResponseCode(200).setBody("{\\\"info\\\":{\\\"name\":\"Lucas Albuquerque\",\"age\":\"21\",\"gender\":\"male\"}}");
            }
            return new MockResponse().setResponseCode(404);
        }
    };
    server.setDispatcher(dispatcher);
    ```
    
    
    ### Download
    
    ```kotlin
    testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
    ```
    
    ### License
    
    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)
  4. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

          assertThat(ioe.cause!!).isInstanceOf<EOFException>()
        }
      }
    
      // TODO GET preferred order - with tests to confirm this
      // 1. successful fresh cached GET response
      // 2. unsuccessful (404, 500) fresh cached GET response
      // 3. successful network response
      // 4. successful stale cached GET response
      // 5. unsuccessful response
      @Test
      fun usesCache() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Call.kt

       *
       * Note that transport-layer success (receiving a HTTP response code, headers and body) does not
       * necessarily indicate application-layer success: `response` may still indicate an unhappy HTTP
       * response code like 404 or 500.
       *
       * @throws IOException if the request could not be executed due to cancellation, a connectivity
       *     problem or timeout. Because networks can fail during an exchange, it is possible that the
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  6. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

        Listener listener;
        synchronized (this) {
          listener = listeners.get(state);
        }
    
        if (code == null || listener == null) {
          return new MockResponse()
              .setResponseCode(404)
              .setBody("unexpected request");
        }
    
        try {
          OAuthSession session = slackApi.exchangeCode(code, redirectUrl());
          listener.sessionGranted(session);
        } catch (IOException e) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  7. docs/features/calls.md

    ## [Responses](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-response/)
    
    The response answers the request with a code (like 200 for success or 404 for not found), headers, and its own optional body.
    
    ## Rewriting Requests
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  8. android-test/src/androidTest/java/okhttp/android/test/letsencrypt/LetsEncryptClientTest.kt

        val request =
          Request.Builder()
            .url("https://valid-isrgrootx1.letsencrypt.org/robots.txt")
            .build()
        client.newCall(request).execute().use { response ->
          assertThat(response.code).isEqualTo(404)
          assertThat(response.protocol).isEqualTo(Protocol.HTTP_2)
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

          MockResponse.Builder()
            .status("HTTP/1.1 404 Not Found")
            .build(),
        )
        newWebSocket()
        clientListener.assertFailure(
          404,
          null,
          ProtocolException::class.java,
          "Expected HTTP 101 response but was '404 Not Found'",
        )
      }
    
      @Test
      fun clientTimeoutClosesBody() {
        webServer.enqueue(
          MockResponse.Builder()
            .code(408)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  10. docs/changelogs/changelog_3x.md

        Nullability was previously ambiguous and lenient but now the compiler will
        enforce strict null checks.
    
     *  New: The response message is now non-null. This is the "Not Found" in the
        status line "HTTP 404 Not Found". If you are building responses
        programmatically (with `new Response.Builder()`) you must now always supply
        a message. An empty string `""` is permitted. This value was never null on
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
Back to top