- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 54 for addReader (0.08 sec)
-
mockwebserver/README.md
You can set a custom body with a string, input stream or byte array. Also add headers with a fluent builder API. ```java MockResponse response = new MockResponse() .addHeader("Content-Type", "application/json; charset=utf-8") .addHeader("Cache-Control", "no-cache") .setBody("{}"); ``` MockResponse can be used to simulate a slow network. This is useful for testing timeouts and interactive testing. ```java
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 18.7K bytes - Viewed (0) -
src/main/java/jcifs/smb1/http/NtlmServlet.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 21:10:40 UTC 2019 - 6.8K bytes - Viewed (0) -
src/main/java/jcifs/http/NtlmHttpFilter.java
} } resp.setHeader("WWW-Authenticate", "NTLM"); if ( offerBasic ) { resp.addHeader("WWW-Authenticate", "Basic realm=\"" + this.realm + "\""); } resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED); resp.setContentLength(0); /* Marcel Feb-15-2005 */
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 14.8K bytes - Viewed (0) -
docs/recipes.md
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Feb 18 08:52:22 UTC 2022 - 40.2K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt
server.enqueue( MockResponse.Builder() .body("hello, Apache HttpClient 5.x") .build(), ) val request = HttpGet(server.url("/").toUri()) request.addHeader("Accept", "text/plain") httpClient.execute(request).use { response -> assertThat(response.code).isEqualTo(200) assertThat(EntityUtils.toString(response.entity)).isEqualTo("hello, Apache HttpClient 5.x")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.1K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt
} private fun dnsResponse(s: String): MockResponse { return MockResponse.Builder() .body(Buffer().write(s.decodeHex())) .addHeader("content-type", "application/dns-message") .addHeader("content-length", s.length / 2) .build() } private fun buildLocalhost( bootstrapClient: OkHttpClient, includeIPv6: Boolean, post: Boolean = false,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 11K bytes - Viewed (0) -
docs/extensions/s3zip/examples/boto3/main.py
aws_secret_access_key='YOUR-SECRETACCESSKEY', config=Config(signature_version='s3v4'), region_name='us-east-1') def _add_header(request, **kwargs): request.headers.add_header('x-minio-extract', 'true') event_system = s3.meta.events event_system.register_first('before-sign.s3.*', _add_header) # List zip contents response = s3.list_objects_v2(Bucket="your-bucket", Prefix="path/to/file.zip/")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 04 21:15:45 UTC 2021 - 771 bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 37.6K bytes - Viewed (0) -
mockwebserver-deprecated/api/mockwebserver.api
public final fun -deprecated_getStatus ()Ljava/lang/String; public final fun -deprecated_getTrailers ()Lokhttp3/Headers; public fun <init> ()V public final fun addHeader (Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse; public final fun addHeader (Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse; public final fun addHeaderLenient (Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 22 12:28:51 UTC 2023 - 10.2K bytes - Viewed (0)