#include <src/rest/request.hpp>
This class implements an instance to host services used by border router.
◆ Request()
otbr::rest::Request::Request |
( |
void |
| ) |
|
The constructor is to initialize Request instance.
◆ GetBody()
std::string otbr::rest::Request::GetBody |
( |
| ) |
const |
This method returns the HTTP method of this request.
- Returns
- A HttpMethod enum representing HTTP method of this request.
◆ GetMethod()
HttpMethod otbr::rest::Request::GetMethod |
( |
| ) |
const |
This method returns the HTTP method of this request.
- Returns
- A integer representing HTTP method.
◆ GetUrl()
std::string otbr::rest::Request::GetUrl |
( |
void |
| ) |
const |
This method returns the url for this request.
- Returns
- A string contains the url of this request.
◆ IsComplete()
bool otbr::rest::Request::IsComplete |
( |
void |
| ) |
const |
This method indicates whether this request is parsed completely.
◆ ResetReadComplete()
void otbr::rest::Request::ResetReadComplete |
( |
void |
| ) |
|
This method resets the request then it could be set by parser from start.
◆ SetBody()
void otbr::rest::Request::SetBody |
( |
const char * |
aString, |
|
|
size_t |
aLength |
|
) |
| |
This method sets the body field of a request.
- Parameters
-
[in] | aString | A pointer points to body string. |
[in] | aLength | Length of the body string |
◆ SetContentLength()
void otbr::rest::Request::SetContentLength |
( |
size_t |
aContentLength | ) |
|
This method sets the content-length field of a request.
- Parameters
-
[in] | aContentLength | An unsigned integer representing content-length. |
◆ SetMethod()
void otbr::rest::Request::SetMethod |
( |
int32_t |
aMethod | ) |
|
This method sets the method of the parsed request.
- Parameters
-
[in] | aMethod | An integer representing request method. |
◆ SetReadComplete()
void otbr::rest::Request::SetReadComplete |
( |
void |
| ) |
|
This method labels the request as complete which means it no longer need to be parsed one more time .
◆ SetUrl()
void otbr::rest::Request::SetUrl |
( |
const char * |
aString, |
|
|
size_t |
aLength |
|
) |
| |
This method sets the Url field of a request.
- Parameters
-
[in] | aString | A pointer points to url string. |
[in] | aLength | Length of the url string |
The documentation for this class was generated from the following files: