Lines Matching defs:Response

94 import fi.iki.elonen.NanoHTTPD.Response.IStatus;
95 import fi.iki.elonen.NanoHTTPD.Response.Status;
318 * Response's HTTP Headers.
321 * The Response object to which headers the queued cookies
324 public void unloadQueue(Response response) {
596 throw new ResponseException(Response.Status.BAD_REQUEST, "BAD REQUEST: Syntax error. Usage: GET /example/file.html");
602 throw new ResponseException(Response.Status.BAD_REQUEST, "BAD REQUEST: Missing URI. Usage: GET /example/file.html");
637 throw new ResponseException(Response.Status.INTERNAL_ERROR, "SERVER INTERNAL ERROR: IOException: " + ioe.getMessage(), ioe);
648 throw new ResponseException(Response.Status.BAD_REQUEST, "BAD REQUEST: Content type is multipart/form-data but contains less than two boundary strings.");
663 throw new ResponseException(Response.Status.BAD_REQUEST, "BAD REQUEST: Content type is multipart/form-data but chunk does not start with boundary.");
697 throw new ResponseException(Response.Status.INTERNAL_ERROR, "Multipart header size exceeds MAX_HEADER_SIZE.");
726 throw new ResponseException(Response.Status.INTERNAL_ERROR, e.toString());
764 Response r = null;
825 throw new ResponseException(Response.Status.BAD_REQUEST, "BAD REQUEST: Syntax error.");
845 throw new ResponseException(Response.Status.INTERNAL_ERROR, "SERVER INTERNAL ERROR: Serve() returned a null response.");
866 Response resp = newFixedLengthResponse(Response.Status.INTERNAL_ERROR, NanoHTTPD.MIME_PLAINTEXT, "SERVER INTERNAL ERROR: IOException: " + ioe.getMessage());
870 Response resp = newFixedLengthResponse(re.getStatus(), NanoHTTPD.MIME_PLAINTEXT, re.getMessage());
1056 throw new ResponseException(Response.Status.BAD_REQUEST,
1176 public static class Response implements Closeable {
1310 protected Response(IStatus status, String mimeType, InputStream data, long totalBytes) {
1528 private final Response.Status status;
1530 public ResponseException(Response.Status status, String message) {
1535 public ResponseException(Response.Status status, String message, Exception e) {
1540 public Response.Status getStatus() {
1932 protected boolean useGzipWhenAccepted(Response r) {
1970 public static Response newChunkedResponse(IStatus status, String mimeType, InputStream data) {
1971 return new Response(status, mimeType, data, -1);
1977 public static Response newFixedLengthResponse(IStatus status, String mimeType, InputStream data, long totalBytes) {
1978 return new Response(status, mimeType, data, totalBytes);
1984 public static Response newFixedLengthResponse(IStatus status, String mimeType, String txt) {
2002 public static Response newFixedLengthResponse(String msg) {
2014 * @return HTTP response, see class Response for details
2016 public Response serve(IHTTPSession session) {
2023 return newFixedLengthResponse(Response.Status.INTERNAL_ERROR, NanoHTTPD.MIME_PLAINTEXT, "SERVER INTERNAL ERROR: IOException: " + ioe.getMessage());
2050 * @return HTTP response, see class Response for details
2053 public Response serve(String uri, Method method, Map<String, String> headers, Map<String, String> parms, Map<String, String> files) {
2054 return newFixedLengthResponse(Response.Status.NOT_FOUND, NanoHTTPD.MIME_PLAINTEXT, "Not Found");