- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 33 for addReader (0.1 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
MockResponse .Builder() .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) .code(responseCode) .body("ABCDE") .addHeader("WWW-Authenticate: challenge") when (responseCode) { HttpURLConnection.HTTP_PROXY_AUTH -> { builder.addHeader("Proxy-Authenticate: Basic realm=\"protected area\"") }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Mar 20 09:13:37 GMT 2026 - 121K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/helper/VirtualHostHelperTest.java
// Matching host header request.addHeader("Host", "example.com"); result = virtualHostHelper.getVirtualHostPath(page); assertEquals("/site1/search", result.getRoutingPath()); // The header remains for subsequent tests due to static request handling // Different matching header added to same request request.addHeader("X-Forwarded-Host", "test.com");Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 11.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallLimitsTest.kt
/** A collection of headers that collectively exceed the limits. */ @Test fun largeResponseHeadersList() { server.enqueue( MockResponse .Builder() .addHeader("Set-Cookie", "a=${"A".repeat(255 * 1024)}") .addHeader("Set-Cookie", "b=${"B".repeat(1 * 1024)}") .body("I'm not even supposed to be here today.") .build(), ) val call = client.newCall(Request(url = server.url("/")))
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:02:18 GMT 2026 - 3.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestCommonTest.kt
builder.header("AZab09~", "AZab09 ~") builder.addHeader("AZab09~", "AZab09 ~") } @Test fun emptyNameForbidden() { val builder = Request.Builder() assertFailsWith<IllegalArgumentException> { builder.header("", "Value") } assertFailsWith<IllegalArgumentException> { builder.addHeader("", "Value") } } @Test
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 11K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
} private fun trailersAndCache(protocol: Protocol) { enableProtocol(protocol) server.enqueue( MockResponse .Builder() .addHeader("h1", "v1") .addHeader("Cache-Control: max-age=30") .body(protocol, "Hello") .trailers(headersOf("t1", "v2")) .build(), ) val call1 = client.newCall(Request(server.url("/")))
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 18.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt
builder.header("AZab09~", "AZab09 ~") builder.addHeader("AZab09~", "AZab09 ~") } @Test fun emptyNameForbidden() { val builder = Request.Builder() assertFailsWith<IllegalArgumentException> { builder.header("", "Value") } assertFailsWith<IllegalArgumentException> { builder.addHeader("", "Value") } } @Test
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 24.6K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
.status("ICY 200 OK") .addHeader("Accept-Ranges: none") .addHeader("Content-Type: audio/mpeg") .addHeader("icy-br:128") .addHeader("ice-audio-info: bitrate=128;samplerate=44100;channels=2") .addHeader("icy-br:128") .addHeader("icy-description:Rock") .addHeader("icy-genre:riders") .addHeader("icy-name:A2RRock") .addHeader("icy-pub:1")
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 133.3K bytes - Click Count (0) -
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
} catch (FileNotFoundException e) { return new MockResponse() .setStatus("HTTP/1.1 404") .addHeader("content-type: text/plain; charset=utf-8") .setBody("NOT FOUND: " + path); } catch (IOException e) { return new MockResponse() .setStatus("HTTP/1.1 500") .addHeader("content-type: text/plain; charset=utf-8") .setBody("SERVER ERROR: " + e); } }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 11 02:37:00 GMT 2026 - 5.3K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CookiesTest.kt
} @Test fun receiveAndSendMultipleCookies() { server.enqueue( MockResponse .Builder() .addHeader("Set-Cookie", "a=android") .addHeader("Set-Cookie", "b=banana") .build(), ) server.enqueue(MockResponse()) val cookieManager = CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER) client =
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Thu Mar 19 07:46:39 GMT 2026 - 14.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Hpack.kt
val staticEntry = STATIC_HEADER_TABLE[index] addHeader(staticEntry) } else { val dynamicTableIndex = dynamicTableIndex(index - STATIC_HEADER_TABLE.size) if (dynamicTableIndex < 0 || dynamicTableIndex >= dynamicTable.size) { throw IOException("Header index too large ${index + 1}") } addHeader(dynamicTable[dynamicTableIndex]!!) } }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:02:18 GMT 2026 - 23.2K bytes - Click Count (0)