Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for 404 (0.14 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. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

        }
      }
    
      private fun send404(
        stream: Http2Stream,
        path: String,
      ) {
        val responseHeaders =
          listOf(
            Header(":status", "404"),
            Header(":version", "HTTP/1.1"),
            Header("content-type", "text/plain"),
          )
        stream.writeHeaders(
          responseHeaders = responseHeaders,
          outFinished = false,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CacheTest.kt

        assertCached(true, 307)
        assertCached(true, 308)
        assertCached(false, 400)
        assertCached(false, 401)
        assertCached(false, 402)
        assertCached(false, 403)
        assertCached(true, 404)
        assertCached(true, 405)
        assertCached(false, 406)
        assertCached(false, 408)
        assertCached(false, 409)
        // the HTTP spec permits caching 410s, but the RI doesn't.
        assertCached(true, 410)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http2/Hpack.kt

          Header(RESPONSE_STATUS, "200"),
          Header(RESPONSE_STATUS, "204"),
          Header(RESPONSE_STATUS, "206"),
          Header(RESPONSE_STATUS, "304"),
          Header(RESPONSE_STATUS, "400"),
          Header(RESPONSE_STATUS, "404"),
          Header(RESPONSE_STATUS, "500"),
          Header("accept-charset", ""),
          Header("accept-encoding", "gzip, deflate"),
          Header("accept-language", ""),
          Header("accept-ranges", ""),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (1)
Back to top