Classes | |
| class | MessageBase |
| class | Request |
| class | Response |
| class | URL |
Typedefs | |
| using | HeadersList = std::vector< std::pair< Header, std::string > > |
| A list of headers A HeadersList is a vector of pairs, where the first element of the pair is a Header enum value and the second element is the value of the header. The index of the Header enum value is used as the key in the vector. | |
Enumerations | |
| enum class | Code { Unknown = 0 , OK = 200 , Created = 201 , BadRequest = 400 , Unauthorized = 401 , Forbidden = 403 , NotFound = 404 , InternalServerError = 500 , ServiceUnavailable = 503 , GatewayTimeout = 504 } |
| Enum to represent HTTP response status codes. More... | |
| enum class | Header { Unknown = 0 , Accept , AccessControlAllowOrigin , AccessControlAllowMethods , AccessControlAllowHeaders , AccessControlAllowCredentials , Authorization , Connection , ContentEncoding , ContentLength , ContentType , Cookie , Date , Expect , Origin , SetCookie , XRefreshToken } |
| Enum of HTTP headers as defined by the standard This enum contains the most commonly used HTTP headers. More... | |
| enum class | Method { Unknown = 0 , GET , HEAD , PUT , DEL , POST , OPTIONS } |
| Enum to represent the request method. More... | |
Functions | |
| template<typename H > | |
| H | AbslHashValue (H h, const URL &url) |
| Combines hash values for a RouteKey object. | |
| std::vector< std::string > | splitPathSegments (const std::string path) |
| absl::flat_hash_map< std::string, std::string > | splitQuerySegments (const std::string &query) |
| using dcn::http::HeadersList = typedef std::vector<std::pair<Header, std::string> > |
A list of headers A HeadersList is a vector of pairs, where the first element of the pair is a Header enum value and the second element is the value of the header. The index of the Header enum value is used as the key in the vector.
|
strong |
Enum to represent HTTP response status codes.
This enum represents the possible status codes of an HTTP response.
The values of the enum are categorized as follows:
Unknown: The response code is not recognized or not supported.OK: The request succeeded.BadRequest: The request could not be understood by the server.Unauthorized: The request requires user authentication.Forbidden: The server understood the request, but refuses to authorize it.NotFound: The server has not found anything matching the request.InternalServerError: The server encountered an unexpected condition.ServiceUnavailable: The server is currently unable to handle the request.GatewayTimeout: The server did not receive a timely response from an upstream server. | Enumerator | |
|---|---|
| Unknown | |
| OK | |
| Created | |
| BadRequest | |
| Unauthorized | |
| Forbidden | |
| NotFound | |
| InternalServerError | |
| ServiceUnavailable | |
| GatewayTimeout | |
|
strong |
Enum of HTTP headers as defined by the standard This enum contains the most commonly used HTTP headers.
|
strong |
Enum to represent the request method.
This enum represents the possible methods of an HTTP request.
The values of the enum are:
Unknown: The request method is not recognized or not supported.GET: method requests a representation of the specified resource.HEAD: method requests headers of the response, not the actual body.PUT: replaces all current representations of the target resource with the request payload.DEL: Tdeletes the specified resource.POST: sends data to the server to create a new resource.OPTIONS: requests information about the communication options for the target resource. | Enumerator | |
|---|---|
| Unknown | |
| GET | |
| HEAD | |
| PUT | |
| DEL | |
| POST | |
| OPTIONS | |
| std::vector< std::string > dcn::http::splitPathSegments | ( | const std::string | path | ) |
| absl::flat_hash_map< std::string, std::string > dcn::http::splitQuerySegments | ( | const std::string & | query | ) |