-
Notifications
You must be signed in to change notification settings - Fork 0
class mount_response
A mount response is like a response_handler, but has much less functions.
| Members | Descriptions |
|---|---|
public mount_response & append(std::string const & field,std::string const & value)
|
Appends the specified value to the HTTP response header field. |
public mount_response & set(std::string const & field,std::string const & value)
|
Sets the response�s HTTP header field to value. |
public mount_response & try_set(std::string const & field,std::string const & value)
|
Sets the response�s HTTP header field to value, if not set. |
public mount_response & status(int status)
|
Sets the response code. |
public int get_status() const |
Gets the response code. |
public void to_response(response_handler & res) const
|
public mount_response & append(std::string const & field,std::string const & value)
Appends the specified value to the HTTP response header field.
If the header is not already set, it creates the header with the specified value.
-
fieldA header field identifier, such as "Warning" or "Link" -
valueA value that is to be appended.
Returns: *this for chaining.
public mount_response & set(std::string const & field,std::string const & value)
Sets the response�s HTTP header field to value.
-
fieldA header field identifier, such as "Warning" or "Link" -
valueA value that is to be appended.
Returns: *this for chaining.
public mount_response & try_set(std::string const & field,std::string const & value)
Sets the response�s HTTP header field to value, if not set.
-
fieldA header field identifier, such as "Warning" or "Link" -
valueA value that is to be appended.
Returns: *this for chaining.
public mount_response & status(int status)
Sets the response code.
-
codeA response code 1xx, 2xx, 3xx, 4xx or 5xx
Returns: *this for chaining.
Gets the response code.
Returns: A response code 1xx, 2xx, 3xx, 4xx or 5xx