Lines Matching refs:request
75 private void addTrafficStatsTag(Request<?> request) {
76 // Tag the request (if API >= 14)
78 TrafficStats.setThreadStatsTag(request.getTrafficStatsTag());
87 Request<?> request;
89 // Take a request from the queue.
90 request = mQueue.take();
100 request.addMarker("network-queue-take");
102 // If the request was cancelled already, do not perform the
103 // network request.
104 if (request.isCanceled()) {
105 request.finish("network-discard-cancelled");
109 addTrafficStatsTag(request);
111 // Perform the network request.
112 NetworkResponse networkResponse = mNetwork.performRequest(request);
113 request.addMarker("network-http-complete");
117 if (networkResponse.notModified && request.hasHadResponseDelivered()) {
118 request.finish("not-modified");
123 Response<?> response = request.parseNetworkResponse(networkResponse);
124 request.addMarker("network-parse-complete");
128 if (request.shouldCache() && response.cacheEntry != null) {
129 mCache.put(request.getCacheKey(), response.cacheEntry);
130 request.addMarker("network-cache-written");
134 request.markDelivered();
135 mDelivery.postResponse(request, response);
138 parseAndDeliverNetworkError(request, volleyError);
143 mDelivery.postError(request, volleyError);
148 private void parseAndDeliverNetworkError(Request<?> request, VolleyError error) {
149 error = request.parseNetworkError(error);
150 mDelivery.postError(request, error);