/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/ |
CheckHandshake.java | 22 import com.squareup.okhttp.Response; 33 @Override public Response intercept(Chain chain) throws IOException { 55 Response response = client.newCall(request).execute(); local 56 if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); 58 System.out.println(response.body().string());
|
PerCallSettings.java | 20 import com.squareup.okhttp.Response; 36 Response response = cloned.newCall(request).execute(); local 37 System.out.println("Response 1 succeeded: " + response); 39 System.out.println("Response 1 failed: " + e); 46 Response response = cloned.newCall(request).execute(); local 47 System.out.println("Response 2 succeeded: " + response); [all...] |
Progress.java | 21 import com.squareup.okhttp.Response; 50 @Override public Response intercept(Chain chain) throws IOException { 51 Response originalResponse = chain.proceed(chain.request()); 58 Response response = client.newCall(request).execute(); local 59 if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); 61 System.out.println(response.body().string());
|
/external/nanohttpd/nanolets/src/test/java/fi/iki/elonen/router/ |
AppNanolets.java | 51 import fi.iki.elonen.NanoHTTPD.Response.IStatus; 52 import fi.iki.elonen.NanoHTTPD.Response.Status; 91 public NanoHTTPD.Response.IStatus getStatus() { 92 return NanoHTTPD.Response.Status.OK; 95 public NanoHTTPD.Response get(UriResource uriResource, Map<String, String> urlParams, NanoHTTPD.IHTTPSession session) {
|
/external/okhttp/okhttp-android-support/src/main/java/com/squareup/okhttp/internal/huc/ |
CacheAdapter.java | 19 import com.squareup.okhttp.Response; 46 @Override public Response get(Request request) throws IOException { 54 @Override public CacheRequest put(Response response) throws IOException { 55 URI uri = response.request().uri(); 56 HttpURLConnection connection = JavaApiConverter.createJavaUrlConnectionForCachePut(response); 81 @Override public void update(Response cached, Response network) throws IOException { 86 // with the original cached response.
|
/system/weaved/buffet/ |
http_transport_client.cc | 35 class ResponseImpl : public HttpClient::Response { 38 explicit ResponseImpl(std::unique_ptr<brillo::http::Response> response) 39 : response_{std::move(response)}, 42 // HttpClient::Response implementation 52 std::unique_ptr<brillo::http::Response> response_; 59 std::unique_ptr<brillo::http::Response> response) { 60 callback.Run(std::unique_ptr<HttpClient::Response>{new ResponseImpl{ 61 std::move(response)}}, [all...] |
/external/libbrillo/brillo/http/ |
http_utils.h | 49 // For more advanced functionality you need to use Request/Response objects 55 // can be obtained from the returned Response object. 56 BRILLO_EXPORT std::unique_ptr<Response> SendRequestAndBlock( 68 BRILLO_EXPORT std::unique_ptr<Response> SendRequestWithNoDataAndBlock( 76 // with the response object. On failure, |error_callback| is called with the 119 // the returned Response object. 120 BRILLO_EXPORT std::unique_ptr<Response> GetAndBlock( 138 // the returned Response object. 139 BRILLO_EXPORT std::unique_ptr<Response> HeadAndBlock( 155 // from the returned Response object [all...] |
http_request.cc | 134 std::unique_ptr<Response> Request::GetResponseAndBlock( 137 return std::unique_ptr<Response>(); 138 std::unique_ptr<Response> response(new Response(connection_)); 140 transport_.reset(); // Indicate that the response has been received 141 return response; 285 "HTTP response already received"); 291 // ********************** Response Class ********************** 293 Response::Response(const std::shared_ptr<Connection>& connection [all...] |
/external/okhttp/okhttp-ws-tests/src/test/java/com/squareup/okhttp/ws/ |
AutobahnTester.java | 20 import com.squareup.okhttp.Response; 72 @Override public void onOpen(WebSocket webSocket, Response response) { 102 @Override public void onFailure(IOException e, Response response) { 120 @Override public void onOpen(WebSocket webSocket, Response response) { 136 @Override public void onFailure(IOException e, Response response) { 158 @Override public void onOpen(WebSocket webSocket, Response response) [all...] |
/prebuilts/go/darwin-x86/src/net/http/ |
responsewrite_test.go | 15 Resp Response 23 Response{ 37 // Unchunked response without Content-Length. 39 Response{ 52 // HTTP/1.1 response with unknown length and Connection: close 54 Response{ 69 // HTTP/1.1 response with unknown length and not setting connection: close 71 Response{ 86 // HTTP/1.1 response with unknown length and not setting connection: close, but 89 Response{ [all...] |
filetransport.go | 34 func (t fileTransport) RoundTrip(req *Request) (resp *Response, err error) { 38 // sends our *Response on, once the *Response itself has been 49 func newPopulateResponseWriter() (*populateResponse, <-chan *Response) { 52 ch: make(chan *Response), 54 res: &Response{ 65 // populateResponse is a ResponseWriter that populates the *Response 66 // in res, and writes its body to a pipe connected to the response 67 // body. Once writes begin or finish() is called, the response is sent 70 res *Response [all...] |
/prebuilts/go/linux-x86/src/net/http/ |
responsewrite_test.go | 15 Resp Response 23 Response{ 37 // Unchunked response without Content-Length. 39 Response{ 52 // HTTP/1.1 response with unknown length and Connection: close 54 Response{ 69 // HTTP/1.1 response with unknown length and not setting connection: close 71 Response{ 86 // HTTP/1.1 response with unknown length and not setting connection: close, but 89 Response{ [all...] |
filetransport.go | 34 func (t fileTransport) RoundTrip(req *Request) (resp *Response, err error) { 38 // sends our *Response on, once the *Response itself has been 49 func newPopulateResponseWriter() (*populateResponse, <-chan *Response) { 52 ch: make(chan *Response), 54 res: &Response{ 65 // populateResponse is a ResponseWriter that populates the *Response 66 // in res, and writes its body to a pipe connected to the response 67 // body. Once writes begin or finish() is called, the response is sent 70 res *Response [all...] |
/external/libbrillo/brillo/dbus/ |
dbus_object_internal_impl.h | 9 // sent back to the caller of D-Bus method via the response message. 54 // a success or error response message had been sent). 61 // (that is, they do not send an error response). 118 auto response = method_response.CreateCustomResponse(); 119 dbus::MessageWriter writer(response.get()); 121 method_response.SendRawResponse(std::move(response)); 140 // synchronous method handlers that may fail and return an error response 167 auto response = method_response.CreateCustomResponse(); 168 dbus::MessageWriter writer(response.get()); 170 method_response.SendRawResponse(std::move(response)); [all...] |
dbus_object_test_helpers.h | 37 // instance of D-Bus method call response message. We use this in tests 38 // to get the response in case the handler processes a method call request 43 void ReceiveResponse(scoped_ptr<dbus::Response> response) { 44 response_.reset(response.release()); 47 std::unique_ptr<dbus::Response> response_; 53 // call sites. Returns a response from the method handler or nullptr if the 54 // method hasn't provided the response message immediately 56 inline std::unique_ptr<dbus::Response> CallMethod( 59 std::unique_ptr<dbus::Response> response local [all...] |
data_serialization_unittest.cc | 19 using dbus::Response; 147 std::unique_ptr<Response> message(Response::CreateEmpty().release()); 171 std::unique_ptr<Response> message(Response::CreateEmpty().release()); 237 std::unique_ptr<Response> message(Response::CreateEmpty().release()); 264 std::unique_ptr<Response> message(Response::CreateEmpty().release()); 333 std::unique_ptr<Response> message(Response::CreateEmpty().release()) [all...] |
/frameworks/volley/src/test/java/com/android/volley/toolbox/ |
ImageRequestTest.java | 24 import com.android.volley.Response; 130 Response<Bitmap> response = request.parseNetworkResponse(networkResponse); local 131 assertNotNull(response); 132 assertTrue(response.isSuccess()); 133 Bitmap bitmap = response.result; 167 assertNotNull(ImageRequest.class.getConstructor(String.class, Response.Listener.class, 168 int.class, int.class, Bitmap.Config.class, Response.ErrorListener.class)); 169 assertNotNull(ImageRequest.class.getConstructor(String.class, Response.Listener.class, 171 Response.ErrorListener.class)) [all...] |
/external/nanohttpd/core/src/test/java/fi/iki/elonen/integration/ |
PutStreamIntegrationTest.java | 59 public Response serve(IHTTPSession session) { 70 return newFixedLengthResponse(Response.Status.INTERNAL_ERROR, NanoHTTPD.MIME_PLAINTEXT, e.getMessage()); 73 String response = String.valueOf(method) + ':' + new String(body); local 74 return newFixedLengthResponse(response); 78 public Response serve(String uri, Method method, Map<String, String> headers, Map<String, String> parms, Map<String, String> files) {
|
/frameworks/volley/src/main/java/com/android/volley/toolbox/ |
RequestFuture.java | 20 import com.android.volley.Response; 31 * Used by providing as your response and error listeners. For example: 43 * JSONObject response = future.get(); 44 * // do something with response 52 * @param <T> The type of parsed response this future expects. 54 public class RequestFuture<T> implements Future<T>, Response.Listener<T>, 55 Response.ErrorListener { 141 public synchronized void onResponse(T response) { 143 mResult = response;
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
TestThread.java | 62 private final SynchronousQueue<Response> responseQueue = new SynchronousQueue<Response>(); 199 * Receives a response from this thread. 201 * @throws TimeoutException if this thread does not offer a response within a resonable amount of 206 private Response getResponse(String methodName) throws Exception { 207 Response response = responseQueue.poll(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); local 208 if (response == null) { 211 assertEquals(methodName, response.methodName); 212 return response; [all...] |
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/ |
HttpTransport.java | 20 import com.squareup.okhttp.Response; 79 @Override public Response.Builder readResponseHeaders() throws IOException { 97 // If the response specified that the connection shouldn't be reused, don't reuse it. 109 @Override public ResponseBody openResponseBody(Response response) throws IOException { 110 Source source = getTransferStream(response); 111 return new RealResponseBody(response.headers(), Okio.buffer(source)); 114 private Source getTransferStream(Response response) throws IOException { 115 if (!HttpEngine.hasBody(response)) { [all...] |
/external/skia/tools/skiaserve/urlhandlers/ |
ClipAlphaHandler.cpp | 12 #include "../Response.h" 14 using namespace Response;
|
/frameworks/volley/src/test/java/com/android/volley/mock/ |
TestRequest.java | 21 import com.android.volley.Response; 32 public Base(String url, Response.ErrorListener listener) { 36 public Base(int method, String url, Response.ErrorListener listener) { 41 protected Response<byte[]> parseNetworkResponse(NetworkResponse response) { 46 protected void deliverResponse(byte[] response) {
|
/frameworks/opt/net/voip/src/java/com/android/server/sip/ |
SipSessionGroup.java | 79 import javax.sip.message.Response; 122 // external address observed from any response 397 Response response = evt.getResponse(); local 398 ViaHeader viaHeader = (ViaHeader)(response.getHeader( 450 return Response.CALL_OR_TRANSACTION_DOES_NOT_EXIST; 454 if (dialog == null) return Response.DECLINE; 459 return Response.CALL_OR_TRANSACTION_DOES_NOT_EXIST; 466 return Response.CALL_OR_TRANSACTION_DOES_NOT_EXIST; 468 return Response.OK 477 int response = processInviteWithReplaces(event, replaces); local 951 Response response = event.getResponse(); local 977 Response response = event.getResponse(); local [all...] |
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
CacheTest.java | 99 * Test that response caching is consistent with the RI and the spec. 106 // We can't test 100 because it's not really a response. 178 Response response = client.newCall(request).execute(); local 179 assertEquals(responseCode, response.code()); 182 response.body().string(); 184 Response cached = cache.get(request); 220 Response response1 = client.newCall(request).execute(); 231 Response response2 = client.newCall(request).execute(); 257 Response response1 = client.newCall(request).execute() 498 Response response = get(server.url("\/")); local 585 Response response = get(server.url("\/")); local 1034 Response response = client.newCall(request).execute(); local 1052 Response response = client.newCall(request).execute(); local 1070 Response response = client.newCall(request).execute(); local 1091 Response response = client.newCall(request).execute(); local 1110 Response response = client.newCall(request).execute(); local 1121 Response response = client.newCall(request).execute(); local 1140 Response response = client.newCall(request).execute(); local 1158 Response response = client.newCall(request).execute(); local 1175 Response response = client.newCall(request).execute(); local 1198 Response response = client.newCall(request).execute(); local 1217 Response response = client.newCall(request).execute(); local 1222 MockResponse response = new MockResponse() local 1234 MockResponse response = new MockResponse() local 1256 Response response = client.newCall(request).execute(); local 1305 Response response = client.newCall(request).execute(); local 1322 Response response = client.newCall(request).execute(); local 1487 Response response = client.newCall(request).execute(); local 1826 Response response = client.newCall(request).execute(); local 1841 Response response = get(server.url("\/")); local 1854 Response response = get(server.url("\/")); local 1862 Response response = get(server.url("\/")); local 1874 Response response = get(server.url("\/")); local 1932 Response response = get(url); local [all...] |