- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 52 for add_header (0.06 sec)
-
okhttp/src/test/java/okhttp3/InterceptorTest.kt
chain.proceed( originalRequest.newBuilder() .method("POST", uppercase(originalRequest.body)) .addHeader("OkHttp-Intercepted", "yep") .build(), ) } val request = Request.Builder() .url(server.url("/")) .addHeader("Original-Header", "foo") .method("PUT", "abc".toRequestBody("text/plain".toMediaType())) .build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/EventListenerTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 56.9K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt
fun createFactory(callFactory: Call.Factory): EventSource.Factory { return EventSource.Factory { request, listener -> val actualRequest = if (request.header("Accept") == null) { request.newBuilder().addHeader("Accept", "text/event-stream").build() } else { request } RealEventSource(actualRequest, listener).apply { connect(callFactory) } } } @JvmStatic
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:18:15 UTC 2024 - 1.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt
val header = when (response.code) { 407 -> "Proxy-Authorization" else -> "Authorization" } return response.request.newBuilder() .addHeader(header, credential) .build() } private fun schemeMatches(response: Response): Boolean { if (scheme == null) return true return response.challenges().any { it.scheme.equals(scheme, ignoreCase = true) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/AccessHeaders.java
Request request = new Request.Builder() .url("https://api.github.com/repos/square/okhttp/issues") .header("User-Agent", "OkHttp Headers.java") .addHeader("Accept", "application/json; q=0.5") .addHeader("Accept", "application/vnd.github.v3+json") .build(); try (Response response = client.newCall(request).execute()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt
if (ageMillis + minFreshMillis >= freshMillis) { builder.addHeader("Warning", "110 HttpURLConnection \"Response is stale\"") } val oneDayMillis = 24 * 60 * 60 * 1000L if (ageMillis > oneDayMillis && isFreshnessLifetimeHeuristic()) { builder.addHeader("Warning", "113 HttpURLConnection \"Heuristic expiration\"") }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12K bytes - Viewed (0) -
src/main/java/jcifs/smb1/http/NtlmHttpFilter.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 21:10:40 UTC 2019 - 10.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
fileSystem.checkNoOpenFiles() } @Test fun get() { server.enqueue( MockResponse.Builder() .body("abc") .clearHeaders() .addHeader("content-type: text/plain") .addHeader("content-length", "3") .build(), ) val sentAt = System.currentTimeMillis() val recordedResponse = executeSynchronously("/", "User-Agent", "SyncApiTest")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java
} synchronized (this) { listeners.remove(state); } // Success! return new MockResponse() .setResponseCode(302) .addHeader("Location", "https://twitter.com/CuteEmergency/status/789457462864863232"); } public interface Listener { void sessionGranted(OAuthSession session); } @Override public void close() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 3.8K bytes - Viewed (0) -
src/main/java/jcifs/http/NtlmServlet.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 7.6K bytes - Viewed (0)