1/*
2 * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpStatus.java $
3 * $Revision: 503381 $
4 * $Date: 2007-02-04 02:59:10 -0800 (Sun, 04 Feb 2007) $
5 *
6 * ====================================================================
7 * Licensed to the Apache Software Foundation (ASF) under one
8 * or more contributor license agreements.  See the NOTICE file
9 * distributed with this work for additional information
10 * regarding copyright ownership.  The ASF licenses this file
11 * to you under the Apache License, Version 2.0 (the
12 * "License"); you may not use this file except in compliance
13 * with the License.  You may obtain a copy of the License at
14 *
15 *   http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing,
18 * software distributed under the License is distributed on an
19 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 * KIND, either express or implied.  See the License for the
21 * specific language governing permissions and limitations
22 * under the License.
23 * ====================================================================
24 *
25 * This software consists of voluntary contributions made by many
26 * individuals on behalf of the Apache Software Foundation.  For more
27 * information on the Apache Software Foundation, please see
28 * <http://www.apache.org/>.
29 *
30 */
31
32package org.apache.http;
33
34/**
35 * Constants enumerating the HTTP status codes.
36 * All status codes defined in RFC1945 (HTTP/1.0), RFC2616 (HTTP/1.1), and
37 * RFC2518 (WebDAV) are listed.
38 *
39 * @see StatusLine
40 * @author Unascribed
41 * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
42 * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
43 *
44 * @version $Revision: 503381 $
45 *
46 * @deprecated Please use {@link java.net.URL#openConnection} instead.
47 *     Please visit <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this webpage</a>
48 *     for further details.
49 */
50@Deprecated
51public interface HttpStatus {
52
53    // --- 1xx Informational ---
54
55    /** <tt>100 Continue</tt> (HTTP/1.1 - RFC 2616) */
56    public static final int SC_CONTINUE = 100;
57    /** <tt>101 Switching Protocols</tt> (HTTP/1.1 - RFC 2616)*/
58    public static final int SC_SWITCHING_PROTOCOLS = 101;
59    /** <tt>102 Processing</tt> (WebDAV - RFC 2518) */
60    public static final int SC_PROCESSING = 102;
61
62    // --- 2xx Success ---
63
64    /** <tt>200 OK</tt> (HTTP/1.0 - RFC 1945) */
65    public static final int SC_OK = 200;
66    /** <tt>201 Created</tt> (HTTP/1.0 - RFC 1945) */
67    public static final int SC_CREATED = 201;
68    /** <tt>202 Accepted</tt> (HTTP/1.0 - RFC 1945) */
69    public static final int SC_ACCEPTED = 202;
70    /** <tt>203 Non Authoritative Information</tt> (HTTP/1.1 - RFC 2616) */
71    public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203;
72    /** <tt>204 No Content</tt> (HTTP/1.0 - RFC 1945) */
73    public static final int SC_NO_CONTENT = 204;
74    /** <tt>205 Reset Content</tt> (HTTP/1.1 - RFC 2616) */
75    public static final int SC_RESET_CONTENT = 205;
76    /** <tt>206 Partial Content</tt> (HTTP/1.1 - RFC 2616) */
77    public static final int SC_PARTIAL_CONTENT = 206;
78    /**
79     * <tt>207 Multi-Status</tt> (WebDAV - RFC 2518) or <tt>207 Partial Update
80     * OK</tt> (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
81     */
82    public static final int SC_MULTI_STATUS = 207;
83
84    // --- 3xx Redirection ---
85
86    /** <tt>300 Mutliple Choices</tt> (HTTP/1.1 - RFC 2616) */
87    public static final int SC_MULTIPLE_CHOICES = 300;
88    /** <tt>301 Moved Permanently</tt> (HTTP/1.0 - RFC 1945) */
89    public static final int SC_MOVED_PERMANENTLY = 301;
90    /** <tt>302 Moved Temporarily</tt> (Sometimes <tt>Found</tt>) (HTTP/1.0 - RFC 1945) */
91    public static final int SC_MOVED_TEMPORARILY = 302;
92    /** <tt>303 See Other</tt> (HTTP/1.1 - RFC 2616) */
93    public static final int SC_SEE_OTHER = 303;
94    /** <tt>304 Not Modified</tt> (HTTP/1.0 - RFC 1945) */
95    public static final int SC_NOT_MODIFIED = 304;
96    /** <tt>305 Use Proxy</tt> (HTTP/1.1 - RFC 2616) */
97    public static final int SC_USE_PROXY = 305;
98    /** <tt>307 Temporary Redirect</tt> (HTTP/1.1 - RFC 2616) */
99    public static final int SC_TEMPORARY_REDIRECT = 307;
100
101    // --- 4xx Client Error ---
102
103    /** <tt>400 Bad Request</tt> (HTTP/1.1 - RFC 2616) */
104    public static final int SC_BAD_REQUEST = 400;
105    /** <tt>401 Unauthorized</tt> (HTTP/1.0 - RFC 1945) */
106    public static final int SC_UNAUTHORIZED = 401;
107    /** <tt>402 Payment Required</tt> (HTTP/1.1 - RFC 2616) */
108    public static final int SC_PAYMENT_REQUIRED = 402;
109    /** <tt>403 Forbidden</tt> (HTTP/1.0 - RFC 1945) */
110    public static final int SC_FORBIDDEN = 403;
111    /** <tt>404 Not Found</tt> (HTTP/1.0 - RFC 1945) */
112    public static final int SC_NOT_FOUND = 404;
113    /** <tt>405 Method Not Allowed</tt> (HTTP/1.1 - RFC 2616) */
114    public static final int SC_METHOD_NOT_ALLOWED = 405;
115    /** <tt>406 Not Acceptable</tt> (HTTP/1.1 - RFC 2616) */
116    public static final int SC_NOT_ACCEPTABLE = 406;
117    /** <tt>407 Proxy Authentication Required</tt> (HTTP/1.1 - RFC 2616)*/
118    public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407;
119    /** <tt>408 Request Timeout</tt> (HTTP/1.1 - RFC 2616) */
120    public static final int SC_REQUEST_TIMEOUT = 408;
121    /** <tt>409 Conflict</tt> (HTTP/1.1 - RFC 2616) */
122    public static final int SC_CONFLICT = 409;
123    /** <tt>410 Gone</tt> (HTTP/1.1 - RFC 2616) */
124    public static final int SC_GONE = 410;
125    /** <tt>411 Length Required</tt> (HTTP/1.1 - RFC 2616) */
126    public static final int SC_LENGTH_REQUIRED = 411;
127    /** <tt>412 Precondition Failed</tt> (HTTP/1.1 - RFC 2616) */
128    public static final int SC_PRECONDITION_FAILED = 412;
129    /** <tt>413 Request Entity Too Large</tt> (HTTP/1.1 - RFC 2616) */
130    public static final int SC_REQUEST_TOO_LONG = 413;
131    /** <tt>414 Request-URI Too Long</tt> (HTTP/1.1 - RFC 2616) */
132    public static final int SC_REQUEST_URI_TOO_LONG = 414;
133    /** <tt>415 Unsupported Media Type</tt> (HTTP/1.1 - RFC 2616) */
134    public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415;
135    /** <tt>416 Requested Range Not Satisfiable</tt> (HTTP/1.1 - RFC 2616) */
136    public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
137    /** <tt>417 Expectation Failed</tt> (HTTP/1.1 - RFC 2616) */
138    public static final int SC_EXPECTATION_FAILED = 417;
139
140    /**
141     * Static constant for a 418 error.
142     * <tt>418 Unprocessable Entity</tt> (WebDAV drafts?)
143     * or <tt>418 Reauthentication Required</tt> (HTTP/1.1 drafts?)
144     */
145    // not used
146    // public static final int SC_UNPROCESSABLE_ENTITY = 418;
147
148    /**
149     * Static constant for a 419 error.
150     * <tt>419 Insufficient Space on Resource</tt>
151     * (WebDAV - draft-ietf-webdav-protocol-05?)
152     * or <tt>419 Proxy Reauthentication Required</tt>
153     * (HTTP/1.1 drafts?)
154     */
155    public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419;
156    /**
157     * Static constant for a 420 error.
158     * <tt>420 Method Failure</tt>
159     * (WebDAV - draft-ietf-webdav-protocol-05?)
160     */
161    public static final int SC_METHOD_FAILURE = 420;
162    /** <tt>422 Unprocessable Entity</tt> (WebDAV - RFC 2518) */
163    public static final int SC_UNPROCESSABLE_ENTITY = 422;
164    /** <tt>423 Locked</tt> (WebDAV - RFC 2518) */
165    public static final int SC_LOCKED = 423;
166    /** <tt>424 Failed Dependency</tt> (WebDAV - RFC 2518) */
167    public static final int SC_FAILED_DEPENDENCY = 424;
168
169    // --- 5xx Server Error ---
170
171    /** <tt>500 Server Error</tt> (HTTP/1.0 - RFC 1945) */
172    public static final int SC_INTERNAL_SERVER_ERROR = 500;
173    /** <tt>501 Not Implemented</tt> (HTTP/1.0 - RFC 1945) */
174    public static final int SC_NOT_IMPLEMENTED = 501;
175    /** <tt>502 Bad Gateway</tt> (HTTP/1.0 - RFC 1945) */
176    public static final int SC_BAD_GATEWAY = 502;
177    /** <tt>503 Service Unavailable</tt> (HTTP/1.0 - RFC 1945) */
178    public static final int SC_SERVICE_UNAVAILABLE = 503;
179    /** <tt>504 Gateway Timeout</tt> (HTTP/1.1 - RFC 2616) */
180    public static final int SC_GATEWAY_TIMEOUT = 504;
181    /** <tt>505 HTTP Version Not Supported</tt> (HTTP/1.1 - RFC 2616) */
182    public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505;
183
184    /** <tt>507 Insufficient Storage</tt> (WebDAV - RFC 2518) */
185    public static final int SC_INSUFFICIENT_STORAGE = 507;
186
187}
188