- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 56 for add_header (0.1 sec)
-
okhttp/src/test/java/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
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/goals/Init.java
secDispatcher.writeConfiguration(config); } else { context.addInHeader(""); context.addInHeader("Values set:"); context.addInHeader("defaultDispatcher=" + config.getDefaultDispatcher()); for (Config c : config.getConfigurations()) { context.addInHeader(" dispatcherName=" + c.getName()); for (ConfigProperty cp : c.getProperties()) {
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 12.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/AccessHeaders.kt
fun run() { val request = 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() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
* by a colon and a value. */ fun addHeader(header: String) = apply { headers.add(header) } /** * Adds a new header with the name and value. This may be used to add multiple headers with the * same name. */ fun addHeader( name: String, value: Any, ) = apply {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
val body = MockStreamHandler() .sendResponse("ok") .exhaustResponse() server.enqueue( MockResponse.Builder() .clearHeaders() .addHeader("h1", "v1") .addHeader("h2", "v2") .trailers(headersOf("trailers", "boom")) .streamHandler(body) .build(), ) val call = client.newCall( Request.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/test/java/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")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
var headers: Headers = mockResponse.headers var trailers: Headers = mockResponse.trailers mockResponse = mockResponse.clearHeaders() mockResponse = mockResponse.addHeader("") mockResponse = mockResponse.addHeader("", "") mockResponse = mockResponse.addHeaderLenient("", Any()) mockResponse = mockResponse.setHeader("", Any()) mockResponse.headers = headersOf() mockResponse.trailers = headersOf()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
MockResponse() .clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie", "a=android") assertThat(headersToList(response)) .containsExactly("Cookie: s=square", "Cookie: a=android") } @Test fun mockResponseSetHeader() { val response = MockResponse() .clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie: a=android")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
.clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie", "a=android") assertThat(headersToList(builder)).containsExactly("Cookie: s=square", "Cookie: a=android") } @Test fun mockResponseSetHeader() { val builder = MockResponse.Builder() .clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie: a=android")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.5K bytes - Viewed (0) -
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)