Lines Matching defs:response

192      * This only gets the URL, you still need to set the response if you intend to access it.
202 * Sets a 404 (not found) response to be returned when a particular request path is passed in.
206 * response.
215 * Sets a response to be returned when a particular request path is passed
219 * @param responseString The response body that will be returned.
221 * response (null is acceptable).
223 * response.
233 * Sets a response to be returned when a particular request path is passed
238 * @param responseString The response body that will be returned.
240 * response (null is acceptable).
241 * @param responseAction The action to be performed when fetching the response. This action
245 * response.
261 * response.
273 * Sets a base64 encoded response to be returned when a particular request path is passed
277 * @param base64EncodedResponse The response body that is base64 encoded. The actual server
278 * response will the decoded binary form.
280 * response (null is acceptable).
282 * response.
384 * Generate a response to the given request.
388 * <p>If there is an action associated with the response, it will be executed inside of
404 Response response = null;
406 response = mResponseMap.get(path);
410 } else if (response == null) {
412 } else if (response.mIsNotFound) {
415 } else if (response.mIsRedirect) {
417 for (Pair<String, String> header : response.mResponseHeaders) {
422 if (response.mResponseAction != null) response.mResponseAction.run();
425 ByteArrayEntity entity = createEntity(response.mResponseData);
428 for (Pair<String, String> header : response.mResponseHeaders) {
439 private void setDateHeaders(HttpResponse response) {
440 response.addHeader("Date", DateUtils.formatDate(new Date(), DateUtils.PATTERN_RFC1123));
444 * Create an empty response with the given status.
447 HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_0, status, null);
471 response.setEntity(entity);
472 response.setHeader("Content-Length", "" + entity.getContentLength());
474 return response;
582 // parsing the response since conn.close() will crash
589 HttpResponse response = mServer.getResponse(request);
590 conn.sendResponseHeader(response);
591 conn.sendResponseEntity(response);