Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for Location (0.24 sec)

  1. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

          val method = response.request.method
          if (method == "GET" || method == "HEAD") return response
          val location = response.header("Location") ?: return response
          return response.newBuilder()
            .removeHeader("Location")
            .header("LegacyRedirectInterceptor-Location", location)
            .build()
        }
      }
    
      @Test
      fun response307WithPostReverted() {
        client =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  2. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

      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()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (1)
  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-logging-interceptor/README.md

    logging.setLevel(Level.BASIC);
    OkHttpClient client = new OkHttpClient.Builder()
      .addInterceptor(logging)
      .build();
    ```
    
    You can change the log level at any time by calling `setLevel()`.
    
    To log to a custom location, pass a `Logger` instance to the constructor.
    ```java
    HttpLoggingInterceptor logging = new HttpLoggingInterceptor(new Logger() {
      @Override public void log(String message) {
        Timber.tag("OkHttp").d(message);
      }
    });
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  5. 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)
  6. okhttp/src/test/java/okhttp3/CallTest.kt

            headers =
              headersOf(
                "Location",
                "/b",
                "Test",
                "Redirect from /a to /b",
              ),
            body = "/a has moved!",
          ),
        )
        server.enqueue(
          MockResponse(
            code = 302,
            headers =
              headersOf(
                "Location",
                "/c",
                "Test",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  7. gradlew.bat

    echo location of your Java installation.
    
    goto fail
    
    :findJavaFromJavaHome
    set JAVA_HOME=%JAVA_HOME:"=%
    set JAVA_EXE=%JAVA_HOME%/bin/java.exe
    
    if exist "%JAVA_EXE%" goto execute
    
    echo.
    echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
    echo.
    echo Please set the JAVA_HOME variable in your environment to match the
    echo location of your Java installation.
    
    goto fail
    
    Batch File
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Nov 25 16:14:58 GMT 2022
    - 2.7K bytes
    - Viewed (0)
  8. 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)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

      val server =
        MockWebServer().apply {
          useHttps(handshakeCertificates.sslSocketFactory(), false)
    
          enqueue(
            MockResponse()
              .setResponseCode(HTTP_MOVED_TEMP)
              .setHeader("Location", "https://www.google.com/robots.txt"),
          )
        }
    
      val clientCertificates =
        HandshakeCertificates.Builder()
          .addPlatformTrustedCertificates()
          .addInsecureHost(server.hostName)
          .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  10. 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)
Back to top