- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 56 for add_header (0.05 sec)
-
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) -
istioctl/pkg/writer/table/writer.go
output = append(output, row.Cells) } return output } func (c *ColoredTableWriter) SetAddRowFunc(f func(obj interface{}) Row) { c.addRowFunc = f } func (c *ColoredTableWriter) AddHeader(names ...string) { cells := make([]Cell, 0) for _, name := range names { cells = append(cells, NewCell(name)) } c.header = Row{Cells: cells} } func (c *ColoredTableWriter) AddRow(obj interface{}) {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Nov 06 09:43:25 UTC 2024 - 2.7K bytes - Viewed (0) -
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) -
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)