#include <Response.h>
◆ Response() [1/5]
ehs::Response::Response |
( |
| ) |
|
Default member initialization.
◆ Response() [2/5]
ehs::Response::Response |
( |
const UInt_32 |
code, |
|
|
const Str_8 & |
server |
|
) |
| |
Initializes this response with a given code and server identifier.
- Parameters
-
[in] | code | The code to give. |
[in] | server | The server identifier. |
◆ Response() [3/5]
ehs::Response::Response |
( |
const char * |
data, |
|
|
const UInt_64 |
size |
|
) |
| |
Initializes this response with the raw response data.
- Parameters
-
[in] | data | The C-style string of the response. |
[in] | size | The size of the given C-style string. |
◆ Response() [4/5]
ehs::Response::Response |
( |
const Str_8 & |
data | ) |
|
Initializes this response with the raw response data.
- Parameters
-
[in] | data | The string of the response. |
◆ Response() [5/5]
ehs::Response::Response |
( |
const Response & |
res | ) |
|
|
default |
Copies members from another object of the same type.
- Parameters
-
[in] | res | The object to copy from. |
◆ AddToBody() [1/2]
void ehs::Response::AddToBody |
( |
const Str_8 & |
data | ) |
|
Adds a value to the body.
- Parameters
-
[in] | data | The value to add. |
◆ AddToBody() [2/2]
void ehs::Response::AddToBody |
( |
const Str_8 & |
var, |
|
|
const Str_8 & |
value |
|
) |
| |
Adds a body variable.
- Parameters
-
[in] | var | The variable identifier. |
[in] | value | The value of the variable. |
◆ AddToHeader()
void ehs::Response::AddToHeader |
( |
const Str_8 & |
var, |
|
|
const Str_8 & |
value |
|
) |
| |
Adds a header variable.
- Parameters
-
[in] | var | The variable identifier. |
[in] | value | The value of the variable. |
◆ FormResult()
Str_8 ehs::Response::FormResult |
( |
| ) |
const |
Forms the raw result of the response to be sent.
- Returns
- The result.
◆ GetBody()
Str_8 ehs::Response::GetBody |
( |
| ) |
const |
Retrieves the entire body.
- Returns
- The result.
◆ GetCode()
UInt_32 ehs::Response::GetCode |
( |
| ) |
const |
Retrieves the response code.
- Returns
- The result.
◆ GetContentType()
Retrieves the content type for the body.
- Returns
- The result.
◆ GetHeader() [1/2]
Retrieves all the header variables in a vector object.
- Returns
- The result.
◆ GetHeader() [2/2]
Str_8 ehs::Response::GetHeader |
( |
const Str_8 & |
var | ) |
const |
Retrieves a header variable.
- Parameters
-
[in] | var | The variable identifier to look for. |
- Returns
- The value of the header variable. Empty if it was not found.
◆ GetJson()
Json ehs::Response::GetJson |
( |
| ) |
const |
Retrieves the entire body as a Json.
- Returns
- The result.
◆ GetServer()
Str_8 ehs::Response::GetServer |
( |
| ) |
const |
Retrieves the server identifier.
- Returns
- The result.
◆ GetVar()
Str_8 ehs::Response::GetVar |
( |
const Str_8 & |
var | ) |
const |
Retrieves a body variable.
- Parameters
-
[in] | var | The variable identifier to look for. |
- Returns
- The value of the body variable. Empty if it was not found.
◆ IsValid()
bool ehs::Response::IsValid |
( |
| ) |
const |
◆ operator=()
Copies members from another object of the same type.
- Parameters
-
[in] | res | The object to copy from. |
- Returns
- The response that has been assigned to.
◆ SetBody()
void ehs::Response::SetBody |
( |
const Str_8 & |
body | ) |
|
Sets the entire body.
- Parameters
-
◆ SetCode()
void ehs::Response::SetCode |
( |
const UInt_32 |
code | ) |
|
Sets the response code to send to the endpoint.
- Parameters
-
[in] | code | The code for success, error or info. |
◆ SetContentType()
void ehs::Response::SetContentType |
( |
const ContentType |
cType | ) |
|
Sets the content type for the body.
- Parameters
-
[in] | cType | The content type to use. |
◆ SetServer()
void ehs::Response::SetServer |
( |
const Str_8 & |
server | ) |
|
Sets the server identifier.
- Parameters
-
[in] | server | The server identifier to use. |
The documentation for this class was generated from the following files: