status

abstract val status: Int

The HTTP status code of the response.

Standard HTTP status codes include:

  • 2xx: Success (200 OK, 201 Created, 204 No Content)

  • 3xx: Redirection (301 Moved Permanently, 302 Found)

  • 4xx: Client Error (400 Bad Request, 401 Unauthorized, 404 Not Found)

  • 5xx: Server Error (500 Internal Server Error, 503 Service Unavailable)

Use the isSuccess() extension function to check if the status is in the 2xx range.