:right-sidebar: True Status =================================================================== .. currentmodule:: gi.repository.Soup .. class:: Status :no-contents-entry: 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 ------- .. rst-class:: interim-class .. class:: Status :no-index: .. method:: 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 :obj:`~gi.repository.Soup.Message.props.status_code` of a given :obj:`~gi.repository.Soup.Message`, you should just look at the message's :obj:`~gi.repository.Soup.Message.props.reason_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. :param status_code: an HTTP status code Fields ------ .. rst-class:: interim-class .. class:: Status :no-index: .. attribute:: ACCEPTED 202 Accepted (HTTP) .. attribute:: BAD_GATEWAY 502 Bad Gateway (HTTP) .. attribute:: BAD_REQUEST 400 Bad Request (HTTP) .. attribute:: CONFLICT 409 Conflict (HTTP) .. attribute:: CONTINUE 100 Continue (HTTP) .. attribute:: CREATED 201 Created (HTTP) .. attribute:: EXPECTATION_FAILED 417 Expectation Failed (HTTP) .. attribute:: FAILED_DEPENDENCY 424 Failed Dependency (WebDAV) .. attribute:: FORBIDDEN 403 Forbidden (HTTP) .. attribute:: FOUND 302 Found (HTTP) .. attribute:: GATEWAY_TIMEOUT 504 Gateway Timeout (HTTP) .. attribute:: GONE 410 Gone (HTTP) .. attribute:: HTTP_VERSION_NOT_SUPPORTED 505 HTTP Version Not Supported (HTTP) .. attribute:: INSUFFICIENT_STORAGE 507 Insufficient Storage (WebDAV) .. attribute:: INTERNAL_SERVER_ERROR 500 Internal Server Error (HTTP) .. attribute:: INVALID_RANGE Shorter alias for :const:`~gi.repository.Soup.Status.REQUESTED_RANGE_NOT_SATISFIABLE` .. attribute:: LENGTH_REQUIRED 411 Length Required (HTTP) .. attribute:: LOCKED 423 Locked (WebDAV) .. attribute:: METHOD_NOT_ALLOWED 405 Method Not Allowed (HTTP) .. attribute:: MISDIRECTED_REQUEST 421 Misdirected Request .. attribute:: MOVED_PERMANENTLY 301 Moved Permanently (HTTP) .. attribute:: MOVED_TEMPORARILY 302 Moved Temporarily (old name, RFC 2068) .. attribute:: MULTIPLE_CHOICES 300 Multiple Choices (HTTP) .. attribute:: MULTI_STATUS 207 Multi-Status (WebDAV) .. attribute:: NONE No status available. (Eg, the message has not been sent yet) .. attribute:: NON_AUTHORITATIVE 203 Non-Authoritative Information (HTTP) .. attribute:: NOT_ACCEPTABLE 406 Not Acceptable (HTTP) .. attribute:: NOT_APPEARING_IN_THIS_PROTOCOL 306 [Unused] (HTTP) .. attribute:: NOT_EXTENDED 510 Not Extended (RFC 2774) .. attribute:: NOT_FOUND 404 Not Found (HTTP) .. attribute:: NOT_IMPLEMENTED 501 Not Implemented (HTTP) .. attribute:: NOT_MODIFIED 304 Not Modified (HTTP) .. attribute:: NO_CONTENT 204 No Content (HTTP) .. attribute:: OK 200 Success (HTTP). Also used by many lower-level soup routines to indicate success. .. attribute:: PARTIAL_CONTENT 206 Partial Content (HTTP) .. attribute:: PAYMENT_REQUIRED 402 Payment Required (HTTP) .. attribute:: PERMANENT_REDIRECT 308 Permanent Redirect (HTTP) .. attribute:: PRECONDITION_FAILED 412 Precondition Failed (HTTP) .. attribute:: PROCESSING 102 Processing (WebDAV) .. attribute:: PROXY_AUTHENTICATION_REQUIRED 407 Proxy Authentication Required (HTTP) .. attribute:: PROXY_UNAUTHORIZED Shorter alias for :const:`~gi.repository.Soup.Status.PROXY_AUTHENTICATION_REQUIRED` .. attribute:: REQUESTED_RANGE_NOT_SATISFIABLE 416 Requested Range Not Satisfiable (HTTP) .. attribute:: REQUEST_ENTITY_TOO_LARGE 413 Request Entity Too Large (HTTP) .. attribute:: REQUEST_TIMEOUT 408 Request Timeout (HTTP) .. attribute:: REQUEST_URI_TOO_LONG 414 Request-URI Too Long (HTTP) .. attribute:: RESET_CONTENT 205 Reset Content (HTTP) .. attribute:: SEE_OTHER 303 See Other (HTTP) .. attribute:: SERVICE_UNAVAILABLE 503 Service Unavailable (HTTP) .. attribute:: SWITCHING_PROTOCOLS 101 Switching Protocols (HTTP) .. attribute:: TEMPORARY_REDIRECT 307 Temporary Redirect (HTTP) .. attribute:: UNAUTHORIZED 401 Unauthorized (HTTP) .. attribute:: UNPROCESSABLE_ENTITY 422 Unprocessable Entity (WebDAV) .. attribute:: UNSUPPORTED_MEDIA_TYPE 415 Unsupported Media Type (HTTP) .. attribute:: USE_PROXY 305 Use Proxy (HTTP)