Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for followRedirect (0.27 sec)

  1. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

                  info: UrlResponseInfo,
                  newLocationUrl: String,
                ) {
                  println("request " + info.httpStatusCode + " " + newLocationUrl)
                  request.followRedirect()
                }
    
                override fun onResponseStarted(
                  request: UrlRequest,
                  info: UrlResponseInfo,
                ) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt

        fun followRedirects(followRedirects: Boolean) =
          apply {
            this.followRedirects = followRedirects
          }
    
        /**
         * Configure this client to allow protocol redirects from HTTPS to HTTP and from HTTP to HTTPS.
         * Redirects are still first restricted by [followRedirects].  Defaults to true.
         *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 51.7K bytes
    - Viewed (0)
  3. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

      private val server = MockWebServer()
    
      @Test fun get() {
        // Not available
        platform.expectFailureOnJdkVersion(8)
    
        val httpClient =
          HttpClient
            .newBuilder()
            .followRedirects(NORMAL)
            .build()
    
        server.enqueue(
          MockResponse
            .Builder()
            .body("hello, Java HTTP Client")
            .build(),
        )
    
        val request =
          HttpRequest
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  4. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

        .default(DEFAULT_TIMEOUT)
    
      val callTimeout: Int by option(
        "--call-timeout",
      ).help(
        "Maximum time allowed for the entire call (seconds)",
      ).int()
        .default(DEFAULT_TIMEOUT)
    
      val followRedirects: Boolean by option("-L", "--location").help("Follow redirects").flag()
    
      val allowInsecure: Boolean by option("-k", "--insecure").help("Allow connections to SSL sites without certs").flag()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

        val connectionPool: ConnectionPool = client.connectionPool()
        val dns: Dns = client.dns()
        val followSslRedirects: Boolean = client.followSslRedirects()
        val followRedirects: Boolean = client.followRedirects()
        val retryOnConnectionFailure: Boolean = client.retryOnConnectionFailure()
        val callTimeoutMillis: Int = client.callTimeoutMillis()
        val connectTimeoutMillis: Int = client.connectTimeoutMillis()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val connectionPool: ConnectionPool = client.connectionPool
        val dns: Dns = client.dns
        val followSslRedirects: Boolean = client.followSslRedirects
        val followRedirects: Boolean = client.followRedirects
        val retryOnConnectionFailure: Boolean = client.retryOnConnectionFailure
        val callTimeoutMillis: Int = client.callTimeoutMillis
        val connectTimeoutMillis: Int = client.connectTimeoutMillis
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt

       *
       * Response header values like `Location` and `Retry-After` are also considered.
       *
       * Client configuration may be used to make follow-up decisions, such as:
       *
       *  * [OkHttpClient.followRedirects] must be true to follow redirects.
       *  * [OkHttpClient.followSslRedirects] must be true to follow redirects that add or remove HTTPS.
       *  * [OkHttpClient.authenticator] must respond to an authorization challenge.
       *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:58:02 UTC 2025
    - 17.4K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

          else -> return null
        }
      }
    
      private fun buildRedirectRequest(
        userResponse: Response,
        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
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:58:02 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  9. okhttp/api/jvm/okhttp.api

    	public final fun dispatcher ()Lokhttp3/Dispatcher;
    	public final fun dns ()Lokhttp3/Dns;
    	public final fun eventListenerFactory ()Lokhttp3/EventListener$Factory;
    	public final fun fastFallback ()Z
    	public final fun followRedirects ()Z
    	public final fun followSslRedirects ()Z
    	public final fun hostnameVerifier ()Ljavax/net/ssl/HostnameVerifier;
    	public final fun interceptors ()Ljava/util/List;
    	public final fun minWebSocketMessageToCompress ()J
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  10. okhttp/api/android/okhttp.api

    	public final fun dispatcher ()Lokhttp3/Dispatcher;
    	public final fun dns ()Lokhttp3/Dns;
    	public final fun eventListenerFactory ()Lokhttp3/EventListener$Factory;
    	public final fun fastFallback ()Z
    	public final fun followRedirects ()Z
    	public final fun followSslRedirects ()Z
    	public final fun hostnameVerifier ()Ljavax/net/ssl/HostnameVerifier;
    	public final fun interceptors ()Ljava/util/List;
    	public final fun minWebSocketMessageToCompress ()J
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
Back to top