Home
last modified time | relevance | path

Searched refs:addHeader (Results 1 – 25 of 85) sorted by relevance

1234

/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/
DResponseCacheTest.java185 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in assertCached()
186 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in assertCached()
189 .addHeader("WWW-Authenticate: challenge"); in assertCached()
191 mockResponse.addHeader("Proxy-Authenticate: Basic realm=\"protected area\""); in assertCached()
193 mockResponse.addHeader("WWW-Authenticate: Basic realm=\"protected area\""); in assertCached()
232 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in testResponseCaching()
233 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in testResponseCaching()
261 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in secureResponseCaching()
262 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in secureResponseCaching()
291 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects()
[all …]
DJavaApiConverterTest.java355 .addHeader("A", "c") in createJavaUrlConnection_responseHeadersOk()
356 .addHeader("B", "d") in createJavaUrlConnection_responseHeadersOk()
357 .addHeader("A", "e") in createJavaUrlConnection_responseHeadersOk()
358 .addHeader("Content-Length", Long.toString(responseBody.contentLength())) in createJavaUrlConnection_responseHeadersOk()
510 .addHeader("key1", "value1_1") in createJavaCacheResponse_httpGet()
511 .addHeader("key2", "value2") in createJavaCacheResponse_httpGet()
512 .addHeader("key1", "value1_2") in createJavaCacheResponse_httpGet()
534 .addHeader("key1", "value1_1") in createJavaCacheResponse_httpPost()
535 .addHeader("key2", "value2") in createJavaCacheResponse_httpPost()
536 .addHeader("key1", "value1_2") in createJavaCacheResponse_httpPost()
[all …]
/external/okhttp/okhttp-urlconnection/src/test/java/com/squareup/okhttp/
DUrlConnectionCacheTest.java168 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in assertCached()
169 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in assertCached()
172 .addHeader("WWW-Authenticate: challenge"); in assertCached()
174 response.addHeader("Proxy-Authenticate: Basic realm=\"protected area\""); in assertCached()
176 response.addHeader("WWW-Authenticate: Basic realm=\"protected area\""); in assertCached()
216 new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in testResponseCaching()
217 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in testResponseCaching()
250 server.enqueue(new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in secureResponseCaching()
251 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in secureResponseCaching()
283 server.enqueue(new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects()
[all …]
DOkUrlFactoryTest.java83 .addHeader("Last-Modified: " + formatDate(0, TimeUnit.SECONDS)) in conditionalCacheHitResponseSourceHeaders()
84 .addHeader("Cache-Control: max-age=0") in conditionalCacheHitResponseSourceHeaders()
99 .addHeader("Last-Modified: " + formatDate(0, TimeUnit.SECONDS)) in conditionalCacheMissResponseSourceHeaders()
100 .addHeader("Cache-Control: max-age=0") in conditionalCacheMissResponseSourceHeaders()
115 .addHeader("Expires: " + formatDate(2, TimeUnit.HOURS)) in cacheResponseSourceHeaders()
143 .addHeader("Location: /b") in setInstanceFollowRedirectsFalse()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DCacheTest.java159 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in assertCached()
160 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in assertCached()
163 .addHeader("WWW-Authenticate: challenge"); in assertCached()
165 mockResponse.addHeader("Proxy-Authenticate: Basic realm=\"protected area\""); in assertCached()
167 mockResponse.addHeader("WWW-Authenticate: Basic realm=\"protected area\""); in assertCached()
212 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in testResponseCaching()
213 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in testResponseCaching()
249 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in secureResponseCaching()
250 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in secureResponseCaching()
284 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects()
[all …]
DCallTest.java111 server.enqueue(new MockResponse().setBody("abc").addHeader("Content-Type: text/plain")); in get()
192 .addHeader("B", "123") in repeatedHeaderNames()
193 .addHeader("B", "234")); in repeatedHeaderNames()
197 .addHeader("A", "345") in repeatedHeaderNames()
198 .addHeader("A", "456") in repeatedHeaderNames()
230 server.enqueue(new MockResponse().addHeader("Content-Type: text/plain")); in head()
566 .addHeader("Content-Type: text/plain")); in illegalToExecuteTwice()
597 .addHeader("Content-Type: text/plain")); in illegalToExecuteTwice_Async()
627 .addHeader("Content-Type: text/plain")); in get_Async()
861 .addHeader("Content-Type: text/plain")); in tls()
[all …]
DURLConnectionTest.java202 .addHeader("A: c") in responseHeaders()
203 .addHeader("B: d") in responseHeaders()
204 .addHeader("A: e") in responseHeaders()
503 server.enqueue(new MockResponse().addHeader("abc: def")); in getResponseCodeNoResponseBody()
718 .addHeader("Content-Length: 3")); in contentDisagreesWithContentLengthHeaderBodyTooLong()
781 mockResponse.addHeader("Transfer-encoding: chunked"); in contentDisagreesWithChunkedHeaderBodyTooLong()
798 mockResponse.addHeader("Transfer-encoding: chunked"); in contentDisagreesWithChunkedHeaderBodyTooShort()
951 .addHeader("Proxy-Authenticate: Basic realm=\"localhost\"")); in proxyAuthenticateOnConnect()
1107 MockResponse response = new MockResponse().addHeader("WWW-Authenticate: challenge") in unauthorizedResponseHandling()
1127 .addHeader("Transfer-encoding: chunked")); in nonHexChunkSize()
[all …]
DInterceptorTest.java180 .addHeader("Content-Encoding: gzip")); in networkInterceptorsObserveNetworkHeaders()
258 .addHeader("OkHttp-Intercepted", "yep") in rewriteRequestToServer()
265 .addHeader("Original-Header", "foo") in rewriteRequestToServer()
288 .addHeader("Original-Header: foo") in rewriteResponseFromServer()
296 .addHeader("OkHttp-Intercepted", "yep") in rewriteResponseFromServer()
326 .addHeader("Request-Interceptor", "Android") // 1. Added first. in multipleInterceptors()
329 .addHeader("Response-Interceptor", "Donut") // 4. Added last. in multipleInterceptors()
337 .addHeader("Request-Interceptor", "Bob") // 2. Added second. in multipleInterceptors()
340 .addHeader("Response-Interceptor", "Cupcake") // 3. Added third. in multipleInterceptors()
373 .addHeader("OkHttp-Intercepted", "yep") in asyncInterceptors()
DRequestTest.java160 builder.addHeader("AZab09 ~", "AZab09 ~"); in headerAcceptsPermittedCharacters()
171 builder.addHeader("", "Value"); in emptyNameForbidden()
215 builder.addHeader(s, "Value"); in assertForbiddenHeader()
225 builder.addHeader("Name", s); in assertForbiddenHeader()
/external/nanohttpd/core/src/test/java/fi/iki/elonen/integration/
DGZipIntegrationTest.java86 request.addHeader("Accept-encoding", "gzip"); in contentEncodingShouldBeAddedToFixedLengthResponses()
98 request.addHeader("Accept-encoding", "gzip"); in contentEncodingShouldBeAddedToChunkedResponses()
109 request.addHeader("Accept-encoding", "deflate,gzip"); in shouldFindCorrectAcceptEncodingAmongMany()
120 request.addHeader("Accept-encoding", "gzip"); in contentLengthShouldBeRemovedFromZippedResponses()
130 request.addHeader("Accept-encoding", "gzip"); in fixedLengthContentIsEncodedProperly()
140 request.addHeader("Accept-encoding", "gzip"); in chunkedContentIsEncodedProperly()
158 … testServer.response.addHeader("Content-Length", "" + ("This is a test".getBytes("UTF-8").length)); in contentShouldNotBeGzippedIfContentLengthIsAddedManually()
160 request.addHeader("Accept-encoding", "gzip"); in contentShouldNotBeGzippedIfContentLengthIsAddedManually()
/external/apache-http/src/org/apache/http/protocol/
DRequestContent.java80 request.addHeader(HTTP.CONTENT_LEN, "0"); in process()
89 request.addHeader(HTTP.TRANSFER_ENCODING, HTTP.CHUNK_CODING); in process()
91 request.addHeader(HTTP.CONTENT_LEN, Long.toString(entity.getContentLength())); in process()
96 request.addHeader(entity.getContentType()); in process()
101 request.addHeader(entity.getContentEncoding()); in process()
DResponseContent.java82 response.addHeader(HTTP.TRANSFER_ENCODING, HTTP.CHUNK_CODING); in process()
84 response.addHeader(HTTP.CONTENT_LEN, Long.toString(entity.getContentLength())); in process()
89 response.addHeader(entity.getContentType()); in process()
94 response.addHeader(entity.getContentEncoding()); in process()
101 response.addHeader(HTTP.CONTENT_LEN, "0"); in process()
/external/nanohttpd/webserver/src/main/java/fi/iki/elonen/
DSimpleWebServer.java355 response.addHeader("Accept-Ranges", "bytes"); in newFixedLengthResponse()
403 res.addHeader("Location", uri); in defaultRespond()
516 res.addHeader("ETag", etag); in serveFile()
530 res.addHeader("Accept-Ranges", "bytes"); in serveFile()
531 res.addHeader("Content-Length", "" + newLen); in serveFile()
532 … res.addHeader("Content-Range", "bytes " + startFrom + "-" + endAt + "/" + fileLen); in serveFile()
533 res.addHeader("ETag", etag); in serveFile()
541 res.addHeader("Content-Range", "bytes */" + fileLen); in serveFile()
542 res.addHeader("ETag", etag); in serveFile()
548 res.addHeader("ETag", etag); in serveFile()
[all …]
/external/mockwebserver/src/test/java/com/google/mockwebserver/
DMockWebServerTest.java89 .addHeader("Cookie: s=square") in testMockResponseAddHeader()
90 .addHeader("Cookie", "a=android"); in testMockResponseAddHeader()
98 .addHeader("Cookie: s=square") in testMockResponseSetHeader()
99 .addHeader("Cookie: a=android") in testMockResponseSetHeader()
100 .addHeader("Cookies: delicious"); in testMockResponseSetHeader()
127 .addHeader("Location: " + server.getUrl("/new-path")) in testRedirect()
169 .addHeader("Transfer-encoding: chunked")); in testNonHexadecimalChunkSize()
185 .addHeader("Content-Length: 4")); in testResponseTimeout()
/external/apache-http/src/org/apache/http/message/
DAbstractHttpMessage.java98 public void addHeader(final Header header) { in addHeader() method in AbstractHttpMessage
99 this.headergroup.addHeader(header); in addHeader()
103 public void addHeader(final String name, final String value) { in addHeader() method in AbstractHttpMessage
107 this.headergroup.addHeader(new BasicHeader(name, value)); in addHeader()
/external/okhttp/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/
DMockWebServerTest.java68 .addHeader("Cookie: s=square") in mockResponseAddHeader()
69 .addHeader("Cookie", "a=android"); in mockResponseAddHeader()
76 .addHeader("Cookie: s=square") in mockResponseSetHeader()
77 .addHeader("Cookie: a=android") in mockResponseSetHeader()
78 .addHeader("Cookies: delicious"); in mockResponseSetHeader()
102 .addHeader("Location: " + server.getUrl("/new-path")) in redirect()
142 .addHeader("Transfer-encoding: chunked")); in nonHexadecimalChunkSize()
157 .addHeader("Content-Length: 4")); in responseTimeout()
/external/mockwebserver/src/main/java/com/google/mockwebserver/
DMockResponse.java107 public MockResponse addHeader(String header) { in addHeader() method in MockResponse
116 public MockResponse addHeader(String name, Object value) { in addHeader() method in MockResponse
117 return addHeader(name + ": " + String.valueOf(value)); in addHeader()
126 return addHeader(name, value); in setHeader()
/external/okhttp/samples/static-server/src/main/java/com/squareup/okhttp/sample/
DSampleServer.java52 .addHeader("content-type: text/plain; charset=utf-8") in dispatch()
57 .addHeader("content-type: text/plain; charset=utf-8") in dispatch()
76 .addHeader("content-type: text/html; charset=utf-8") in directoryToResponse()
84 .addHeader("content-type: " + contentType(path)); in fileToResponse()
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/
DAccessHeaders.java30 .addHeader("Accept", "application/json; q=0.5") in run()
31 .addHeader("Accept", "application/vnd.github.v3+json") in run()
/external/apache-http/src/org/apache/http/
DHttpMessage.java116 void addHeader(Header header); in addHeader() method
125 void addHeader(String name, String value); in addHeader() method
/external/volley/src/main/java/com/android/volley/toolbox/
DHttpClientStack.java109 postRequest.addHeader( in createHttpRequest()
126 postRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType()); in createHttpRequest()
133 putRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType()); in createHttpRequest()
146 patchRequest.addHeader(HEADER_CONTENT_TYPE, request.getBodyContentType()); in createHttpRequest()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/
DRecordingOkAuthenticator.java48 .addHeader("Authorization", credential) in authenticate()
56 .addHeader("Proxy-Authorization", credential) in authenticateProxy()
/external/apache-http/android/src/android/net/http/
DRequest.java129 addHeader(HOST_HEADER, getHostPort()); in Request()
134 addHeader(ACCEPT_ENCODING_HEADER, "gzip"); in Request()
167 void addHeader(String name, String value) { in addHeader() method in Request
178 mHttpRequest.addHeader(name, value); in addHeader()
194 addHeader(entry.getKey(), entry.getValue()); in addHeaders()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/framed/
DHttpOverSpdyTest.java211 new MockResponse().addHeader("Content-Encoding: gzip").setBody(gzip("ABCABCABC"))); in gzippedResponseBody()
217 .addHeader("www-authenticate: Basic realm=\"protected area\"") in authenticate()
235 .addHeader("Location: /foo") in redirect()
327 server.enqueue(new MockResponse().addHeader("cache-control: max-age=60").setBody("A")); in responsesAreCached()
343 server.enqueue(new MockResponse().addHeader("ETag: v1").setBody("A")); in conditionalCache()
359 server.enqueue(new MockResponse().addHeader("cache-control: max-age=60").setBody("ABCD")); in responseCachedWithoutConsumingFullBody()
360 server.enqueue(new MockResponse().addHeader("cache-control: max-age=60").setBody("EFGH")); in responseCachedWithoutConsumingFullBody()
378 .addHeader("set-cookie: c=oreo; domain=" + server.getCookieDomain()) in acceptAndTransmitCookies()
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/mockwebserver/
DMockResponse.java97 public MockResponse addHeader(String header) { in addHeader() method in MockResponse
106 public MockResponse addHeader(String name, Object value) { in addHeader() method in MockResponse
127 return addHeader(name, value); in setHeader()

1234