Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for fakefs (0.16 sec)

  1. docs/changelogs/changelog_3x.md

     *  **OkHttpClient now implements the new `Call.Factory` interface.** This
        interface will make your code easier to test. When you test code that makes
        HTTP requests, you can use this interface to replace the real `OkHttpClient`
        with your own mocks or fakes.
    
        The interface will also let you use OkHttp's API with another HTTP client's
        implementation. This is useful in sandboxed environments like Google App
    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)
  2. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        )
        server.enqueue(MockResponse(body = "abc"))
        server.enqueue(MockResponse(body = "def"))
        val request = Request(server.url("/"))
    
        // First call makes a new connection and fails because it is the only route.
        assertFailsWith<StreamResetException> {
          client.newCall(request).execute()
        }.also { expected ->
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

     *
     *  * https://example.net/
     *
     *  * https://example.com/
     *
     * This is because those two hosts share the same IP address. This is an old, bad design decision
     * that makes `java.net.URL` unusable for many things. It shouldn't be used as a [Map] key or in a
     * [Set]. Doing so is both inefficient because equality may require a DNS lookup, and incorrect
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  4. okhttp/src/test/java/okhttp3/EventListenerTest.kt

        server.enqueue(
          MockResponse.Builder()
            .code(301)
            .setHeader("Location", "http://www.fakeurl:" + server.port)
            .build(),
        )
        server.enqueue(MockResponse())
        val dns = FakeDns()
        dns["fakeurl"] = client.dns.lookup(server.hostName)
        dns["www.fakeurl"] = client.dns.lookup(server.hostName)
        client =
          client.newBuilder()
            .dns(dns)
            .build()
        val call =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

            if (dns != this.dns) {
              this.routeDatabase = null
            }
            this.dns = dns
          }
    
        /**
         * Sets the HTTP proxy that will be used by connections created by this client. This takes
         * precedence over [proxySelector], which is only honored when this proxy is null (which it is
         * by default). To disable proxy use completely, call `proxy(Proxy.NO_PROXY)`.
         */
        fun proxy(proxy: Proxy?) =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        peer.acceptFrame() // ACK
        peer.sendFrame().ping(false, 2, 0)
        peer.acceptFrame()
        peer.play()
    
        // Play it back.
        val connection = connect(peer)
    
        // fake a settings frame with clear flag set.
        val settings2 = Settings()
        settings2[Settings.MAX_CONCURRENT_STREAMS] = 60000
        connection.readerRunnable.applyAndAckSettings(true, settings2)
        connection.withLock {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
Back to top