Builder for the luciad::HttpResponse class.
More...
#include <luciad/net/http/HttpResponse.h>
◆ ~Builder()
| luciad::HttpResponse::Builder::~Builder |
( |
| ) |
|
◆ Builder() [1/2]
| luciad::HttpResponse::Builder::Builder |
( |
const Builder & | other | ) |
|
Copy constructor.
- Parameters
-
| other | the builder to copy. |
◆ Builder() [2/2]
| luciad::HttpResponse::Builder::Builder |
( |
Builder && | other | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
| other | the builder to move from. |
◆ body()
Sets the HTTP response content.
This parameter is optional.
- Parameters
-
| body | the response content. |
- Returns
- this builder.
◆ build()
◆ header() [1/2]
Sets the given http header to the set of headers for this response.
- Parameters
-
- Returns
- this builder.
◆ header() [2/2]
| Builder & luciad::HttpResponse::Builder::header |
( |
std::string | name, |
|
|
std::string | value ) |
Sets the given name value pair to the set of headers for this response.
- Parameters
-
| name | header name |
| value | header value |
- Returns
- this builder.
◆ statusCode()
| Builder & luciad::HttpResponse::Builder::statusCode |
( |
int32_t | statusCode | ) |
|
Sets the status code of the HTTP response.
This parameter is mandatory. If it is not set, HttpResponse::Builder::build will throw an exception.
- Parameters
-
| statusCode | the status code for this response. |
- Returns
- this builder.