- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for location (0.22 sec)
-
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) -
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) -
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) -
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) -
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) -
okhttp/src/test/java/okhttp3/CallTest.kt
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) -
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) -
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) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt
this.allocationLimit = Http2Connection.DEFAULT_SETTINGS.getMaxConcurrentStreams() http2Connection.start() } /** * Returns true if this connection can carry a stream allocation to `address`. If non-null * `route` is the resolved route for a connection. */ internal fun isEligible( address: Address, routes: List<Route>?, ): Boolean { lock.assertHeld()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 15.4K bytes - Viewed (0) -
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)