Home
last modified time | relevance | path

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

1234

/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/
DResponseCacheTest.java196 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in assertCached()
197 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in assertCached()
200 .addHeader("WWW-Authenticate: challenge"); in assertCached()
202 mockResponse.addHeader("Proxy-Authenticate: Basic realm=\"protected area\""); in assertCached()
204 mockResponse.addHeader("WWW-Authenticate: Basic realm=\"protected area\""); in assertCached()
243 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in testResponseCaching()
244 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in testResponseCaching()
272 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in secureResponseCaching()
273 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in secureResponseCaching()
302 .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.java174 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in assertCached()
175 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in assertCached()
178 .addHeader("WWW-Authenticate: challenge"); in assertCached()
180 response.addHeader("Proxy-Authenticate: Basic realm=\"protected area\""); in assertCached()
182 response.addHeader("WWW-Authenticate: Basic realm=\"protected area\""); in assertCached()
222 new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in testResponseCaching()
223 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in testResponseCaching()
256 server.enqueue(new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in secureResponseCaching()
257 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in secureResponseCaching()
289 server.enqueue(new MockResponse().addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects()
[all …]
DOkUrlFactoryTest.java73 .addHeader("Last-Modified: " + formatDate(0, TimeUnit.SECONDS)) in conditionalCacheHitResponseSourceHeaders()
74 .addHeader("Cache-Control: max-age=0") in conditionalCacheHitResponseSourceHeaders()
89 .addHeader("Last-Modified: " + formatDate(0, TimeUnit.SECONDS)) in conditionalCacheMissResponseSourceHeaders()
90 .addHeader("Cache-Control: max-age=0") in conditionalCacheMissResponseSourceHeaders()
105 .addHeader("Expires: " + formatDate(2, TimeUnit.HOURS)) in cacheResponseSourceHeaders()
133 .addHeader("Location: /b") in setInstanceFollowRedirectsFalse()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DCacheTest.java165 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in assertCached()
166 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in assertCached()
169 .addHeader("WWW-Authenticate: challenge"); in assertCached()
171 mockResponse.addHeader("Proxy-Authenticate: Basic realm=\"protected area\""); in assertCached()
173 mockResponse.addHeader("WWW-Authenticate: Basic realm=\"protected area\""); in assertCached()
215 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in testResponseCaching()
216 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in testResponseCaching()
252 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in secureResponseCaching()
253 .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS)) in secureResponseCaching()
287 .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS)) in responseCachingAndRedirects()
[all …]
DCallTest.java110 server.enqueue(new MockResponse().setBody("abc").addHeader("Content-Type: text/plain")); in get()
199 server.enqueue(new MockResponse().addHeader("Content-Type: text/plain")); in head()
495 .addHeader("Content-Type: text/plain")); in illegalToExecuteTwice()
525 .addHeader("Content-Type: text/plain")); in illegalToExecuteTwice_Async()
555 .addHeader("Content-Type: text/plain")); in get_Async()
773 .addHeader("Content-Type: text/plain")); in tls()
786 .addHeader("Content-Type: text/plain")); in tls_Async()
927 … server.enqueue(new MockResponse().setResponseCode(301).addHeader("Location: http://square.com")); in setFollowSslRedirectsFalse()
1033 .addHeader("ETag: v1") in cacheHit()
1034 .addHeader("Cache-Control: max-age=60") in cacheHit()
[all …]
DInterceptorTest.java181 .addHeader("Content-Encoding: gzip")); in networkInterceptorsObserveNetworkHeaders()
230 .addHeader("OkHttp-Intercepted", "yep") in rewriteRequestToServer()
237 .addHeader("Original-Header", "foo") in rewriteRequestToServer()
260 .addHeader("Original-Header: foo") in rewriteResponseFromServer()
268 .addHeader("OkHttp-Intercepted", "yep") in rewriteResponseFromServer()
298 .addHeader("Request-Interceptor", "Android") // 1. Added first. in multipleInterceptors()
301 .addHeader("Response-Interceptor", "Donut") // 4. Added last. in multipleInterceptors()
309 .addHeader("Request-Interceptor", "Bob") // 2. Added second. in multipleInterceptors()
312 .addHeader("Response-Interceptor", "Cupcake") // 3. Added third. in multipleInterceptors()
345 .addHeader("OkHttp-Intercepted", "yep") in asyncInterceptors()
/external/jetty/src/java/org/eclipse/jetty/websocket/
DWebSocketServletConnectionD00.java69 response.addHeader("Connection","Upgrade"); in handshake()
72 response.addHeader("Sec-WebSocket-Origin",origin); in handshake()
74 … response.addHeader("Sec-WebSocket-Location",(request.isSecure()?"wss://":"ws://") + host + uri); in handshake()
77 response.addHeader("Sec-WebSocket-Protocol",subprotocol); in handshake()
84 response.addHeader("Connection","Upgrade"); in handshake()
85 response.addHeader("WebSocket-Origin",origin); in handshake()
86 … response.addHeader("WebSocket-Location",(request.isSecure()?"wss://":"ws://") + host + uri); in handshake()
89 response.addHeader("WebSocket-Protocol",subprotocol); in handshake()
DWebSocketServletConnectionD08.java45 response.addHeader("Connection","Upgrade"); in handshake()
46 response.addHeader("Sec-WebSocket-Accept",hashKey(key)); in handshake()
49 response.addHeader("Sec-WebSocket-Protocol",subprotocol); in handshake()
54 response.addHeader("Sec-WebSocket-Extensions",ext.getParameterizedName()); in handshake()
DWebSocketServletConnectionRFC6455.java45 response.addHeader("Connection","Upgrade"); in handshake()
46 response.addHeader("Sec-WebSocket-Accept",hashKey(key)); in handshake()
49 response.addHeader("Sec-WebSocket-Protocol",subprotocol); in handshake()
54 response.addHeader("Sec-WebSocket-Extensions",ext.getParameterizedName()); in handshake()
DWebSocketServletConnectionD06.java44 response.addHeader("Connection","Upgrade"); in handshake()
45 response.addHeader("Sec-WebSocket-Accept",hashKey(key)); in handshake()
48 response.addHeader("Sec-WebSocket-Protocol",subprotocol); in handshake()
/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/mockwebserver/src/test/java/com/google/mockwebserver/
DMockWebServerTest.java83 .addHeader("Cookie: s=square") in testMockResponseAddHeader()
84 .addHeader("Cookie", "a=android"); in testMockResponseAddHeader()
92 .addHeader("Cookie: s=square") in testMockResponseSetHeader()
93 .addHeader("Cookie: a=android") in testMockResponseSetHeader()
94 .addHeader("Cookies: delicious"); in testMockResponseSetHeader()
121 .addHeader("Location: " + server.getUrl("/new-path")) in testRedirect()
163 .addHeader("Transfer-encoding: chunked")); in testNonHexadecimalChunkSize()
179 .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/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/
DURLConnectionTest.java216 .addHeader("A: c") in responseHeaders()
217 .addHeader("B: d") in responseHeaders()
218 .addHeader("A: e") in responseHeaders()
510 server.enqueue(new MockResponse().addHeader("abc: def")); in getResponseCodeNoResponseBody()
724 .addHeader("Content-Length: 3")); in contentDisagreesWithContentLengthHeader()
776 mockResponse.addHeader("Transfer-encoding: chunked"); in contentDisagreesWithChunkedHeader()
924 .addHeader("Proxy-Authenticate: Basic realm=\"localhost\"")); in proxyAuthenticateOnConnect()
1078 MockResponse response = new MockResponse().addHeader("WWW-Authenticate: challenge") in unauthorizedResponseHandling()
1097 .addHeader("Transfer-encoding: chunked")); in nonHexChunkSize()
1110 .addHeader("Transfer-encoding: chunked")); in malformedChunkSize()
[all …]
/external/okhttp/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/
DMockWebServerTest.java60 .addHeader("Cookie: s=square") in mockResponseAddHeader()
61 .addHeader("Cookie", "a=android"); in mockResponseAddHeader()
68 .addHeader("Cookie: s=square") in mockResponseSetHeader()
69 .addHeader("Cookie: a=android") in mockResponseSetHeader()
70 .addHeader("Cookies: delicious"); in mockResponseSetHeader()
94 .addHeader("Location: " + server.getUrl("/new-path")) in redirect()
134 .addHeader("Transfer-encoding: chunked")); in nonHexadecimalChunkSize()
149 .addHeader("Content-Length: 4")); in responseTimeout()
/external/nanohttpd/webserver/src/main/java/fi/iki/elonen/
DSimpleWebServer.java303 res.addHeader("Location", uri); in respond()
398 res.addHeader("Content-Range", "bytes 0-0/" + fileLen); in serveFile()
399 res.addHeader("ETag", etag); in serveFile()
419 res.addHeader("Content-Length", "" + dataLen); in serveFile()
420 … res.addHeader("Content-Range", "bytes " + startFrom + "-" + endAt + "/" + fileLen); in serveFile()
421 res.addHeader("ETag", etag); in serveFile()
428 res.addHeader("Content-Length", "" + fileLen); in serveFile()
429 res.addHeader("ETag", etag); in serveFile()
452 res.addHeader("Accept-Ranges", "bytes"); in createResponse()
459 res.addHeader("Accept-Ranges", "bytes"); in createResponse()
/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/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/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/jetty/src/java/org/eclipse/jetty/http/gzip/
DAbstractCompressedStream.java246 addHeader("Vary",_vary); in doCompress()
281 addHeader("Vary",_vary); in doNotCompress()
369 protected void addHeader(String name,String value) in addHeader() method in AbstractCompressedStream
371 _response.addHeader(name, value); in addHeader()
/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()

1234