Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for rotation (1.14 sec)

  1. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      fun redirect() {
        server.enqueue(
          MockResponse()
            .setResponseCode(HttpURLConnection.HTTP_MOVED_TEMP)
            .addHeader("Location: " + server.url("/new-path"))
            .setBody("This page has moved!"),
        )
        server.enqueue(MockResponse().setBody("This is the new location!"))
        val connection = server.url("/").toUrl().openConnection()
        val inputStream = connection.getInputStream()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CookiesTest.kt

        val redirectSource = MockWebServer()
        redirectSource.enqueue(
          MockResponse.Builder()
            .code(HttpURLConnection.HTTP_MOVED_TEMP)
            .addHeader("Location: $redirectTargetUrl")
            .build(),
        )
        redirectSource.start()
        val redirectSourceUrl = urlWithIpAddress(redirectSource, "/")
        val cookieManager = CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

          MockResponse.Builder()
            .code(HttpURLConnection.HTTP_MOVED_TEMP)
            .setHeader("Location", "/b")
            .headersDelay(100, TimeUnit.MILLISECONDS)
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .code(HttpURLConnection.HTTP_MOVED_TEMP)
            .setHeader("Location", "/c")
            .headersDelay(100, TimeUnit.MILLISECONDS)
            .build(),
        )
        server.enqueue(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt

          requestHeaders: List<Header>,
        )
    
        /**
         * HTTP/2 only. Expresses that resources for the connection or a client- initiated stream are
         * available from a different network location or protocol configuration.
         *
         * See [alt-svc][alt_svc].
         *
         * [alt_svc]: http://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-01
         *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        method: String,
      ): Request? {
        // Does the client allow redirects?
        if (!client.followRedirects) return null
    
        val location = userResponse.header("Location") ?: return null
        // Don't follow redirects to unsupported protocols.
        val url = userResponse.request.url.resolve(location) ?: return null
    
        // If configured, don't follow redirects between SSL and non-SSL.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

    import okio.Buffer
    import okio.BufferedSource
    import okio.ByteString
    import okio.ForwardingSource
    import okio.Source
    import okio.buffer
    
    /**
     * Streaming decoder of data encoded following Abstract Syntax Notation One (ASN.1). There are
     * multiple variants of ASN.1, including:
     *
     *  * DER: Distinguished Encoding Rules. This further constrains ASN.1 for deterministic encoding.
     *  * BER: Basic Encoding Rules.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/DuplexTest.kt

            .requestIOException()
            .exhaustResponse()
        server.enqueue(
          MockResponse.Builder()
            .clearHeaders()
            .code(HttpURLConnection.HTTP_MOVED_PERM)
            .addHeader("Location: /b")
            .streamHandler(body)
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .body("this is /b")
            .build(),
        )
        val call =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

          execute(differentDnsUrl)
        }
      }
    
      @Test
      fun skipsOnRedirectWhenDnsDontMatch() {
        server.enqueue(
          MockResponse.Builder()
            .code(301)
            .addHeader("Location", url.newBuilder().host("differentdns.com").build())
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .body("unexpected call")
            .build(),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        client =
          client.newBuilder()
            .connectionPool(ConnectionPool(0, 5, TimeUnit.SECONDS))
            .build()
        server.enqueue(
          MockResponse(
            code = 301,
            headers = headersOf("Location", "/b"),
            body = "a",
          ),
        )
        server.enqueue(MockResponse(body = "b"))
        val request = Request(server.url("/"))
        val response = client.newCall(request).execute()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        server.enqueue(
          MockResponse.Builder()
            .code(HttpURLConnection.HTTP_MOVED_TEMP)
            .addHeader("Location: " + server.url("/new-path"))
            .body("This page has moved!")
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .body("This is the new location!")
            .build(),
        )
        val connection = server.url("/").toUrl().openConnection()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
Back to top