michael@0: /*
michael@0: * ====================================================================
michael@0: * Licensed to the Apache Software Foundation (ASF) under one
michael@0: * or more contributor license agreements. See the NOTICE file
michael@0: * distributed with this work for additional information
michael@0: * regarding copyright ownership. The ASF licenses this file
michael@0: * to you under the Apache License, Version 2.0 (the
michael@0: * "License"); you may not use this file except in compliance
michael@0: * with the License. You may obtain a copy of the License at
michael@0: *
michael@0: * http://www.apache.org/licenses/LICENSE-2.0
michael@0: *
michael@0: * Unless required by applicable law or agreed to in writing,
michael@0: * software distributed under the License is distributed on an
michael@0: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
michael@0: * KIND, either express or implied. See the License for the
michael@0: * specific language governing permissions and limitations
michael@0: * under the License.
michael@0: * ====================================================================
michael@0: *
michael@0: * This software consists of voluntary contributions made by many
michael@0: * individuals on behalf of the Apache Software Foundation. For more
michael@0: * information on the Apache Software Foundation, please see
michael@0: * .
michael@0: *
michael@0: */
michael@0:
michael@0: package ch.boye.httpclientandroidlib;
michael@0:
michael@0: /**
michael@0: * Constants enumerating the HTTP status codes.
michael@0: * All status codes defined in RFC1945 (HTTP/1.0), RFC2616 (HTTP/1.1), and
michael@0: * RFC2518 (WebDAV) are listed.
michael@0: *
michael@0: * @see StatusLine
michael@0: *
michael@0: * @since 4.0
michael@0: */
michael@0: public interface HttpStatus {
michael@0:
michael@0: // --- 1xx Informational ---
michael@0:
michael@0: /** 100 Continue (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_CONTINUE = 100;
michael@0: /** 101 Switching Protocols (HTTP/1.1 - RFC 2616)*/
michael@0: public static final int SC_SWITCHING_PROTOCOLS = 101;
michael@0: /** 102 Processing (WebDAV - RFC 2518) */
michael@0: public static final int SC_PROCESSING = 102;
michael@0:
michael@0: // --- 2xx Success ---
michael@0:
michael@0: /** 200 OK (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_OK = 200;
michael@0: /** 201 Created (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_CREATED = 201;
michael@0: /** 202 Accepted (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_ACCEPTED = 202;
michael@0: /** 203 Non Authoritative Information (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203;
michael@0: /** 204 No Content (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_NO_CONTENT = 204;
michael@0: /** 205 Reset Content (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_RESET_CONTENT = 205;
michael@0: /** 206 Partial Content (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_PARTIAL_CONTENT = 206;
michael@0: /**
michael@0: * 207 Multi-Status (WebDAV - RFC 2518) or 207 Partial Update
michael@0: * OK (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
michael@0: */
michael@0: public static final int SC_MULTI_STATUS = 207;
michael@0:
michael@0: // --- 3xx Redirection ---
michael@0:
michael@0: /** 300 Mutliple Choices (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_MULTIPLE_CHOICES = 300;
michael@0: /** 301 Moved Permanently (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_MOVED_PERMANENTLY = 301;
michael@0: /** 302 Moved Temporarily (Sometimes Found) (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_MOVED_TEMPORARILY = 302;
michael@0: /** 303 See Other (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_SEE_OTHER = 303;
michael@0: /** 304 Not Modified (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_NOT_MODIFIED = 304;
michael@0: /** 305 Use Proxy (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_USE_PROXY = 305;
michael@0: /** 307 Temporary Redirect (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_TEMPORARY_REDIRECT = 307;
michael@0:
michael@0: // --- 4xx Client Error ---
michael@0:
michael@0: /** 400 Bad Request (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_BAD_REQUEST = 400;
michael@0: /** 401 Unauthorized (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_UNAUTHORIZED = 401;
michael@0: /** 402 Payment Required (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_PAYMENT_REQUIRED = 402;
michael@0: /** 403 Forbidden (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_FORBIDDEN = 403;
michael@0: /** 404 Not Found (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_NOT_FOUND = 404;
michael@0: /** 405 Method Not Allowed (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_METHOD_NOT_ALLOWED = 405;
michael@0: /** 406 Not Acceptable (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_NOT_ACCEPTABLE = 406;
michael@0: /** 407 Proxy Authentication Required (HTTP/1.1 - RFC 2616)*/
michael@0: public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407;
michael@0: /** 408 Request Timeout (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_REQUEST_TIMEOUT = 408;
michael@0: /** 409 Conflict (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_CONFLICT = 409;
michael@0: /** 410 Gone (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_GONE = 410;
michael@0: /** 411 Length Required (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_LENGTH_REQUIRED = 411;
michael@0: /** 412 Precondition Failed (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_PRECONDITION_FAILED = 412;
michael@0: /** 413 Request Entity Too Large (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_REQUEST_TOO_LONG = 413;
michael@0: /** 414 Request-URI Too Long (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_REQUEST_URI_TOO_LONG = 414;
michael@0: /** 415 Unsupported Media Type (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415;
michael@0: /** 416 Requested Range Not Satisfiable (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
michael@0: /** 417 Expectation Failed (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_EXPECTATION_FAILED = 417;
michael@0:
michael@0: /**
michael@0: * Static constant for a 418 error.
michael@0: * 418 Unprocessable Entity (WebDAV drafts?)
michael@0: * or 418 Reauthentication Required (HTTP/1.1 drafts?)
michael@0: */
michael@0: // not used
michael@0: // public static final int SC_UNPROCESSABLE_ENTITY = 418;
michael@0:
michael@0: /**
michael@0: * Static constant for a 419 error.
michael@0: * 419 Insufficient Space on Resource
michael@0: * (WebDAV - draft-ietf-webdav-protocol-05?)
michael@0: * or 419 Proxy Reauthentication Required
michael@0: * (HTTP/1.1 drafts?)
michael@0: */
michael@0: public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419;
michael@0: /**
michael@0: * Static constant for a 420 error.
michael@0: * 420 Method Failure
michael@0: * (WebDAV - draft-ietf-webdav-protocol-05?)
michael@0: */
michael@0: public static final int SC_METHOD_FAILURE = 420;
michael@0: /** 422 Unprocessable Entity (WebDAV - RFC 2518) */
michael@0: public static final int SC_UNPROCESSABLE_ENTITY = 422;
michael@0: /** 423 Locked (WebDAV - RFC 2518) */
michael@0: public static final int SC_LOCKED = 423;
michael@0: /** 424 Failed Dependency (WebDAV - RFC 2518) */
michael@0: public static final int SC_FAILED_DEPENDENCY = 424;
michael@0:
michael@0: // --- 5xx Server Error ---
michael@0:
michael@0: /** 500 Server Error (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_INTERNAL_SERVER_ERROR = 500;
michael@0: /** 501 Not Implemented (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_NOT_IMPLEMENTED = 501;
michael@0: /** 502 Bad Gateway (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_BAD_GATEWAY = 502;
michael@0: /** 503 Service Unavailable (HTTP/1.0 - RFC 1945) */
michael@0: public static final int SC_SERVICE_UNAVAILABLE = 503;
michael@0: /** 504 Gateway Timeout (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_GATEWAY_TIMEOUT = 504;
michael@0: /** 505 HTTP Version Not Supported (HTTP/1.1 - RFC 2616) */
michael@0: public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505;
michael@0:
michael@0: /** 507 Insufficient Storage (WebDAV - RFC 2518) */
michael@0: public static final int SC_INSUFFICIENT_STORAGE = 507;
michael@0:
michael@0: }