Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for fakefs (0.18 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

      /** Sets the results for `hostname`.  */
      operator fun set(
        hostname: String,
        addresses: List<InetAddress>,
      ): FakeDns {
        hostAddresses[hostname] = addresses
        return this
      }
    
      /** Clears the results for `hostname`.  */
      fun clear(hostname: String): FakeDns {
        hostAddresses.remove(hostname)
        return this
      }
    
      @Throws(UnknownHostException::class)
      fun lookup(
        hostname: String,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

       */
      @Throws(IOException::class)
      fun authenticate(
        route: Route?,
        response: Response,
      ): Request?
    
      companion object {
        /** An authenticator that knows no credentials and makes no attempt to authenticate. */
        @JvmField
        val NONE: Authenticator = AuthenticatorNone()
    
        private class AuthenticatorNone : Authenticator {
          override fun authenticate(
            route: Route?,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. mockwebserver/README.md

    MockWebServer
    =============
    
    A scriptable web server for testing HTTP clients
    
    
    ### Motivation
    
    This library makes it easy to test that your app Does The Right Thing when it
    makes HTTP and HTTPS calls. It lets you specify which responses to return and
    then verify that requests were made as expected.
    
    Because it exercises your full HTTP stack, you can be confident that you're
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  4. docs/features/events.md

    Events
    ======
    
    Events allow you to capture metrics on your application’s HTTP calls. Use events to monitor:
    
     * The size and frequency of the HTTP calls your application makes. If you’re making too many calls, or your calls are too large, you should know about it!
     * The performance of these calls on the underlying network. If the network’s performance isn’t sufficient, you need to either improve the network or use less of it.
    
    ### EventListener
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  5. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

      val referer: String? by option("-e", "--referer", help = "Referer URL")
    
      val verbose: Boolean by option("-v", "--verbose", help = "Makes $NAME verbose during the operation").flag()
    
      val sslDebug: Boolean by option(help = "Output SSL Debug").flag()
    
      val url: String? by argument(name = "url", help = "Remote resource URL")
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

            ) {
              socket = connection.socket() as SSLSocket
            }
    
            override fun requestHeadersStart(call: Call) {
              if (closed) {
                throw IOException("fake socket failure")
              }
            }
          }
        val localClient = client.newBuilder().eventListener(eventListener).build()
    
        val call1 = localClient.newCall(Request(server.url("/")))
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

        assertThat(recordedRequest.handshakeServerNames).containsExactly("cash.app")
      }
    
      /**
       * Connect to [hostnameOrIpAddress] and return what was received. To fake an arbitrary hostname we
       * tell MockWebServer to act as a proxy.
       */
      private fun requestToHostnameViaProxy(hostnameOrIpAddress: String): RecordedRequest {
        val heldCertificate =
          HeldCertificate.Builder()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (1)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      }
    
      @Test
      fun invalidHost() {
        // Note that 1234.1.1.1 is an invalid host in a URI, but URL isn't as strict.
        client =
          client.newBuilder()
            .dns(FakeDns())
            .build()
        assertFailsWith<UnknownHostException> {
          getResponse(
            Request.Builder()
              .url("http://1234.1.1.1/index.html".toHttpUrl())
              .build(),
          )
        }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_4x.md

        fix insecure hosts crash with an `IllegalArgumentException` on Android.
    
    
    ## Version 4.7.0
    
    _2020-05-17_
    
     *  New: `HandshakeCertificates.Builder.addInsecureHost()` makes it easy to turn off security in
        private development environments that only carry test data. Prefer this over creating an
        all-trusting `TrustManager` because only hosts on the allowlist are insecure. From
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

      private lateinit var server: MockWebServer
      private lateinit var client: OkHttpClient
      private lateinit var rootCa: HeldCertificate
      private lateinit var certificate: HeldCertificate
      private val dns = FakeDns()
      private lateinit var url: HttpUrl
      private lateinit var serverIps: List<InetAddress>
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
        platform.assumeHttp2Support()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
Back to top