Status
- class Status
These represent the known HTTP status code values, plus various network and internal errors.
Note that no libsoup functions take or return this type directly; any function that works with status codes will accept unrecognized status codes as well.
Methods
- class Status
- get_phrase(status_code: int) str
Looks up the stock HTTP description of
status_code
.There is no reason for you to ever use this function. If you wanted the textual description for the
status_code
of a givenMessage
, you should just look at the message’sreason_phrase
. However, you should only do that for use in debugging messages; HTTP reason phrases are not localized, and are not generally very descriptive anyway, and so they should never be presented to the user directly. Instead, you should create you own error messages based on the status code, and on what you were trying to do.- Parameters:
status_code – an HTTP status code
Fields
- class Status
- ACCEPTED
202 Accepted (HTTP)
- BAD_GATEWAY
502 Bad Gateway (HTTP)
- BAD_REQUEST
400 Bad Request (HTTP)
- CONFLICT
409 Conflict (HTTP)
- CONTINUE
100 Continue (HTTP)
- CREATED
201 Created (HTTP)
- EXPECTATION_FAILED
417 Expectation Failed (HTTP)
- FAILED_DEPENDENCY
424 Failed Dependency (WebDAV)
- FORBIDDEN
403 Forbidden (HTTP)
- FOUND
302 Found (HTTP)
- GATEWAY_TIMEOUT
504 Gateway Timeout (HTTP)
- GONE
410 Gone (HTTP)
- HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported (HTTP)
- INSUFFICIENT_STORAGE
507 Insufficient Storage (WebDAV)
- INTERNAL_SERVER_ERROR
500 Internal Server Error (HTTP)
- INVALID_RANGE
Shorter alias for
REQUESTED_RANGE_NOT_SATISFIABLE
- LENGTH_REQUIRED
411 Length Required (HTTP)
- LOCKED
423 Locked (WebDAV)
- METHOD_NOT_ALLOWED
405 Method Not Allowed (HTTP)
- MISDIRECTED_REQUEST
421 Misdirected Request
- MOVED_PERMANENTLY
301 Moved Permanently (HTTP)
- MOVED_TEMPORARILY
302 Moved Temporarily (old name, RFC 2068)
- MULTIPLE_CHOICES
300 Multiple Choices (HTTP)
- MULTI_STATUS
207 Multi-Status (WebDAV)
- NONE
No status available. (Eg, the message has not been sent yet)
- NON_AUTHORITATIVE
203 Non-Authoritative Information (HTTP)
- NOT_ACCEPTABLE
406 Not Acceptable (HTTP)
- NOT_APPEARING_IN_THIS_PROTOCOL
306 [Unused] (HTTP)
- NOT_EXTENDED
510 Not Extended (RFC 2774)
- NOT_FOUND
404 Not Found (HTTP)
- NOT_IMPLEMENTED
501 Not Implemented (HTTP)
- NOT_MODIFIED
304 Not Modified (HTTP)
- NO_CONTENT
204 No Content (HTTP)
- OK
200 Success (HTTP). Also used by many lower-level soup routines to indicate success.
- PARTIAL_CONTENT
206 Partial Content (HTTP)
- PAYMENT_REQUIRED
402 Payment Required (HTTP)
- PERMANENT_REDIRECT
308 Permanent Redirect (HTTP)
- PRECONDITION_FAILED
412 Precondition Failed (HTTP)
- PROCESSING
102 Processing (WebDAV)
- PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required (HTTP)
- PROXY_UNAUTHORIZED
Shorter alias for
PROXY_AUTHENTICATION_REQUIRED
- REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable (HTTP)
- REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large (HTTP)
- REQUEST_TIMEOUT
408 Request Timeout (HTTP)
- REQUEST_URI_TOO_LONG
414 Request-URI Too Long (HTTP)
- RESET_CONTENT
205 Reset Content (HTTP)
- SEE_OTHER
303 See Other (HTTP)
- SERVICE_UNAVAILABLE
503 Service Unavailable (HTTP)
- SWITCHING_PROTOCOLS
101 Switching Protocols (HTTP)
- TEMPORARY_REDIRECT
307 Temporary Redirect (HTTP)
- UNAUTHORIZED
401 Unauthorized (HTTP)
- UNPROCESSABLE_ENTITY
422 Unprocessable Entity (WebDAV)
- UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type (HTTP)
- USE_PROXY
305 Use Proxy (HTTP)