Represents the HTTP status code and status text of an incoming response. More...
Public Member Functions | |
BHttpStatusClass | StatusClass () const noexcept |
Map the code value to a BHttpStatusClass value. | |
BHttpStatusCode | StatusCode () const noexcept |
Map the code value to a BHttpStatusCode value. | |
Public Attributes | |
int16 | code = 0 |
The three digit status code. | |
BString | text |
A textual representation of the result status. | |
Represents the HTTP status code and status text of an incoming response.
The HTTP Standard specifies that each response should include a three digit status code and a phrase that describes the status code. When processing the response status, you should ignore the textual representation and only look at the status code.
Instances of this class provide a representation of the actual status information in the response. There is no additional validation done, other than that the structure of the status line is in compliance with the HTTP specification.
|
noexcept |
Map the code value to a BHttpStatusClass value.
BHttpStatusClass::Invalid
if the return code cannot be maped.
|
noexcept |
Map the code value to a BHttpStatusCode value.
BHttpStatusCode::Unknown
if the return code cannot be maped.int16 BPrivate::Network::BHttpStatus::code = 0 |
The three digit status code.
This code represents the result of how the server is processing or has processed a request. Common codes are 200
indicating success, or 404
indicating that the requested resource is not found.
See RFC7231 and its references for more information.
BString BPrivate::Network::BHttpStatus::text |
A textual representation of the result status.
As defined in the specification, the status text should only be taken as informative. Only the BHttpStatus::code should be used for further processing.