Home
last modified time | relevance | path

Searched refs:urlConnection (Results 1 – 19 of 19) sorted by relevance

/external/glide/library/src/main/java/com/bumptech/glide/load/data/
DHttpUrlFetcher.java24 private HttpURLConnection urlConnection; field in HttpUrlFetcher
57 urlConnection = connectionFactory.build(url); in loadDataWithRedirects()
58 urlConnection.setConnectTimeout(2500); in loadDataWithRedirects()
59 urlConnection.setReadTimeout(2500); in loadDataWithRedirects()
60 urlConnection.setUseCaches(false); in loadDataWithRedirects()
61 urlConnection.setDoInput(true); in loadDataWithRedirects()
64 urlConnection.connect(); in loadDataWithRedirects()
68 final int statusCode = urlConnection.getResponseCode(); in loadDataWithRedirects()
70 stream = urlConnection.getInputStream(); in loadDataWithRedirects()
73 String redirectUrlString = urlConnection.getHeaderField("Location"); in loadDataWithRedirects()
[all …]
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/wifi/
DHttpFacade.java103 HttpURLConnection urlConnection; in httpRequest() local
105 urlConnection = (HttpURLConnection) targetURL.openConnection(); in httpRequest()
106 urlConnection.connect(); in httpRequest()
107 int respCode = urlConnection.getResponseCode(); in httpRequest()
108 String respMsg = urlConnection.getResponseMessage(); in httpRequest()
115 return urlConnection; in httpRequest()
135 HttpURLConnection urlConnection = httpRequest(url); in httpDownloadFile() local
156 String contentDisposition = urlConnection.getHeaderField("Content-Disposition"); in httpDownloadFile()
174 InputStream in = new BufferedInputStream(urlConnection.getInputStream()); in httpDownloadFile()
178 urlConnection.disconnect(); in httpDownloadFile()
[all …]
/external/walt/android/WALT/app/src/main/java/org/chromium/latency/walt/
DLogUploader.java51 HttpURLConnection urlConnection = in loadInBackground() local
53 urlConnection.setRequestMethod("POST"); in loadInBackground()
54 urlConnection.setDoOutput(true); in loadInBackground()
55 urlConnection.setRequestProperty("Content-Type", "text/plain"); in loadInBackground()
57 new BufferedOutputStream(urlConnection.getOutputStream()); in loadInBackground()
61 final int responseCode = urlConnection.getResponseCode(); in loadInBackground()
/external/okhttp/repackaged/okhttp-android-support/src/main/java/com/android/okhttp/internal/huc/
DJavaApiConverter.java70 public static Response createOkResponseForCachePut(URI uri, URLConnection urlConnection) in createOkResponseForCachePut() argument
73 HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection; in createOkResponseForCachePut()
78 Headers responseHeaders = createHeaders(urlConnection.getHeaderFields()); in createOkResponseForCachePut()
80 Headers varyHeaders = varyHeaders(urlConnection, responseHeaders); in createOkResponseForCachePut()
113 ResponseBody okBody = createOkBody(urlConnection); in createOkResponseForCachePut()
156 private static Headers varyHeaders(URLConnection urlConnection, Headers responseHeaders) { in varyHeaders() argument
170 if (!(urlConnection instanceof CacheHttpURLConnection in varyHeaders()
171 || urlConnection instanceof CacheHttpsURLConnection)) { in varyHeaders()
177 Map<String, List<String>> requestProperties = urlConnection.getRequestProperties(); in varyHeaders()
502 private static ResponseBody createOkBody(final URLConnection urlConnection) {
[all …]
/external/okhttp/okhttp-android-support/src/main/java/com/squareup/okhttp/internal/huc/
DJavaApiConverter.java68 public static Response createOkResponseForCachePut(URI uri, URLConnection urlConnection) in createOkResponseForCachePut() argument
71 HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection; in createOkResponseForCachePut()
76 Headers responseHeaders = createHeaders(urlConnection.getHeaderFields()); in createOkResponseForCachePut()
78 Headers varyHeaders = varyHeaders(urlConnection, responseHeaders); in createOkResponseForCachePut()
111 ResponseBody okBody = createOkBody(urlConnection); in createOkResponseForCachePut()
154 private static Headers varyHeaders(URLConnection urlConnection, Headers responseHeaders) { in varyHeaders() argument
168 if (!(urlConnection instanceof CacheHttpURLConnection in varyHeaders()
169 || urlConnection instanceof CacheHttpsURLConnection)) { in varyHeaders()
175 Map<String, List<String>> requestProperties = urlConnection.getRequestProperties(); in varyHeaders()
500 private static ResponseBody createOkBody(final URLConnection urlConnection) {
[all …]
/external/okhttp/benchmarks/src/main/java/com/squareup/okhttp/benchmarks/
DUrlConnection.java63 HttpURLConnection urlConnection = (HttpURLConnection) url.url().openConnection(); in run() local
64 InputStream in = urlConnection.getInputStream(); in run()
65 if ("gzip".equals(urlConnection.getHeaderField("Content-Encoding"))) { in run()
DOkHttp.java67 HttpURLConnection urlConnection = new OkUrlFactory(client).open(url.url()); in run() local
68 long total = readAllAndClose(urlConnection.getInputStream()); in run()
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/
DResponseCacheTest.java239 HttpURLConnection urlConnection = openConnection(server.getUrl("/")); in testResponseCaching() local
240 InputStream in = urlConnection.getInputStream(); in testResponseCaching()
241 assertEquals("I love ", readAscii(urlConnection, "I love ".length())); in testResponseCaching()
243 assertEquals("spiders", readAscii(urlConnection, "spiders".length())); in testResponseCaching()
247 urlConnection = openConnection(server.getUrl("/")); // cached! in testResponseCaching()
248 in = urlConnection.getInputStream(); in testResponseCaching()
250 readAscii(urlConnection, "I love puppies but hate spiders".length())); in testResponseCaching()
251 assertEquals(200, urlConnection.getResponseCode()); in testResponseCaching()
252 assertEquals("Fantastic", urlConnection.getResponseMessage()); in testResponseCaching()
2017 URLConnection urlConnection = openConnection(url);
[all …]
/external/okhttp/okhttp-android-support/src/main/java/com/squareup/okhttp/
DAndroidShimResponseCache.java68 @Override public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { in put() argument
69 Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); in put()
/external/okhttp/repackaged/okhttp-android-support/src/main/java/com/android/okhttp/
DAndroidShimResponseCache.java70 @Override public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { in put() argument
71 Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); in put()
/external/okhttp/android/src/main/java/com/android/okhttp/internalandroidapi/
DAndroidResponseCacheAdapter.java83 public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { in put() argument
84 Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); in put()
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/android/
DHttpResponseCache.java101 @Override public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { in put() argument
102 return shimResponseCache.put(uri, urlConnection); in put()
/external/okhttp/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/
DAndroidResponseCacheAdapter.java85 public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { in put() argument
86 Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); in put()
/external/mockwebserver/src/test/java/com/google/mockwebserver/
DMockWebServerTest.java190 URLConnection urlConnection = server.getUrl("/").openConnection(); in testResponseTimeout() local
191 urlConnection.setReadTimeout(1000); in testResponseTimeout()
192 InputStream in = urlConnection.getInputStream(); in testResponseTimeout()
/external/okhttp/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/
DMockWebServerTest.java160 URLConnection urlConnection = server.getUrl("/").openConnection(); in responseTimeout() local
161 urlConnection.setReadTimeout(1000); in responseTimeout()
162 InputStream in = urlConnection.getInputStream(); in responseTimeout()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowHttpResponseCache.java97 protected CacheRequest put(URI uri, URLConnection urlConnection) { in put() argument
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DURLConnectionTest.java3218 URLConnection urlConnection = client.open(new URL("http://and roid.com/"));
3220 urlConnection.getInputStream();
3228 URLConnection urlConnection =
3233 urlConnection.getInputStream();
3240 URLConnection urlConnection = client.open(new URL("http://host\u0000/"));
3242 urlConnection.getInputStream();
3253 HttpURLConnection urlConnection = client.open(server.getUrl("/"));
3254 assertEquals(302, urlConnection.getResponseCode());
3255 assertEquals(redirectUrl, urlConnection.getHeaderField("Location"));
3259 URLConnection urlConnection = client.open(new URL("http://host\u0001/"));
[all …]
/external/okhttp/okhttp-urlconnection/src/test/java/com/squareup/okhttp/
DUrlConnectionCacheTest.java223 HttpURLConnection urlConnection = client.open(server.getUrl("/")); in testResponseCaching() local
224 InputStream in = urlConnection.getInputStream(); in testResponseCaching()
225 assertEquals("I love ", readAscii(urlConnection, "I love ".length())); in testResponseCaching()
227 assertEquals("spiders", readAscii(urlConnection, "spiders".length())); in testResponseCaching()
233 urlConnection = client.open(server.getUrl("/")); // cached! in testResponseCaching()
234 in = urlConnection.getInputStream(); in testResponseCaching()
236 readAscii(urlConnection, "I love puppies but hate spiders".length())); in testResponseCaching()
237 assertEquals(200, urlConnection.getResponseCode()); in testResponseCaching()
238 assertEquals("Fantastic", urlConnection.getResponseMessage()); in testResponseCaching()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
DConnectivityManagerFacade.java1094 URLConnection urlConnection = network.openConnection(url); in connectivityNetworkOpenConnection() local
1100 InputStream in = new BufferedInputStream(urlConnection.getInputStream()); in connectivityNetworkOpenConnection()