- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 54 for addHeader (0.06 sec)
-
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) -
istioctl/pkg/writer/table/writer_test.go
return testObject{ name: name, namespace: namespace, version: version, } } func TestWriter(t *testing.T) { got := &bytes.Buffer{} w := NewStyleWriter(got) w.AddHeader("NAME", "NAMESPACE", "VERSION") w.SetAddRowFunc(func(obj interface{}) Row { o := obj.(testObject) return Row{ Cells: []Cell{ NewCell(o.name), NewCell(o.namespace, color.FgGreen),
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sat Oct 08 04:41:42 UTC 2022 - 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) -
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) -
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)