Java Reference
In-Depth Information
Code and message
Meaning
HttpURLConnection constant
402 Payment Required
Not used today, but may be used in the future to indicate that some
sort of payment is required to access the resource.
HTTP_PAYMENT_RE
QUIRED
403 Forbidden
The server understood the request, but is deliberately refusing to
process it. Authorization will not help. This is sometimes used when
a client has exceeded its quota.
HTTP_FORBIDDEN
404 Not Found
This most common error response indicates that the server cannot
find the requested resource. It may indicate a bad link, a document
that has moved with no forwarding address, a mistyped URL, or
something similar.
HTTP_NOT_FOUND
405 Method Not
Allowed
The request method is not allowed for the specified resource; for
instance, you tried to PUT a file on a web server that doesn't support
PUT or tried to POST to a URI that only allows GET .
HTTP_BAD_METHOD
406 Not Acceptable
The requested resource cannot be provided in a format the client is
willing to accept, as indicated by the Accept field of the request HTTP
header.
HTTP_NOT_ACCEPTABLE
407 Proxy
Authentication
Required
An intermediate proxy server requires authentication from the client,
probably in the form of a username and password, before it will
retrieve the requested resource.
HTTP_PROXY_AUTH
408 Request Timeout
The client took too long to send the request, perhaps because of
network congestion.
HTTP_CLIENT_TIMEOUT
409 Conflict
A temporary conflict prevents the request from being fulfilled; for
instance, two clients are trying to PUT the same file at the same time.
HTTP_CONFLICT
410 Gone
Like a 404, but makes a stronger assertion about the existence of the
resource. The resource has been deliberately deleted (not moved) and
will not be restored. Links to it should be removed.
HTTP_GONE
411 Length Required
The client must but did not send a Content-length field in the client
request HTTP header.
HTTP_LENGTH_REQUIRED
412 Precondition
Failed
A condition for the request that the client specified in the request
HTTP header is not satisfied.
HTTP_PRECON_FAILED
413 Request Entity Too
Large
The body of the client request is larger than the server is able to
process at this time.
HTTP_ENTI
TY_TOO_LARGE
414 Request-URI Too
Long
The URI of the request is too long. This is important to prevent certain
buffer overflow attacks.
HTTP_REQ_TOO_LONG
415 Unsupported
Media Type
The server does not understand or accept the MIME content type of
the request body.
HTTP_UNSUPPOR
TED_TYPE
416 Requested range
Not Satisfiable
The server cannot send the byte range the client requested.
N/A
417 Expectation Failed
The server cannot meet the client's expectation given in an Expect-
request header field.
N/A
418 I'm a teapot
Attempting to brew coffee with a teapot.
N/A
420 Enhance Your Calm
The server is rate limiting the request. Nonstandard; used only by
Twitter.
N/A
Search WWH ::




Custom Search