Malloy
Loading...
Searching...
No Matches
Public Member Functions | List of all members
malloy::http::response< Body, Fields > Class Template Reference

#include <response.hpp>

Inheritance diagram for malloy::http::response< Body, Fields >:
Inheritance graph
[legend]
Collaboration diagram for malloy::http::response< Body, Fields >:
Collaboration graph
[legend]

Public Member Functions

 response ()=default
 
 response (msg_t &&msg)
 
 response (const boost::beast::http::response_header< Fields > &header)
 
 response (boost::beast::http::response_header< Fields > &&header)
 
 response (const status &status_)
 
 response (const response &other)=default
 
 response (response &&other) noexcept=default
 
virtual ~response ()=default
 
responseoperator= (const response &rhs)=default
 
responseoperator= (response &&rhs) noexcept=default
 
void set_status (http::status status)
 
http::status status () const
 
void add_cookie (const cookie &c)
 

Detailed Description

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
class malloy::http::response< Body, Fields >

The response type.

Constructor & Destructor Documentation

◆ response() [1/7]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
malloy::http::response< Body, Fields >::response ( )
default

Default constructor.

◆ response() [2/7]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
malloy::http::response< Body, Fields >::response ( msg_t &&  msg)
inlineexplicit

Constructor.

Parameters
msgThe HTTP message.

◆ response() [3/7]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
malloy::http::response< Body, Fields >::response ( const boost::beast::http::response_header< Fields > &  header)
inlineexplicit

Constructor.

Parameters
headerThe header.

◆ response() [4/7]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
malloy::http::response< Body, Fields >::response ( boost::beast::http::response_header< Fields > &&  header)
inlineexplicit

Constructor.

Parameters
headerThe header.

◆ response() [5/7]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
malloy::http::response< Body, Fields >::response ( const status status_)
inlineexplicit

Constructor.

Parameters
status_The HTTP status to use.

◆ response() [6/7]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
malloy::http::response< Body, Fields >::response ( const response< Body, Fields > &  other)
default

Copy constructor.

Parameters
otherThe object to copy-construct from.

◆ response() [7/7]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
malloy::http::response< Body, Fields >::response ( response< Body, Fields > &&  other)
defaultnoexcept

Move constructor.

Parameters
otherThe object to move-construct from.

◆ ~response()

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
virtual malloy::http::response< Body, Fields >::~response ( )
virtualdefault

Destructor.

Member Function Documentation

◆ add_cookie()

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
void malloy::http::response< Body, Fields >::add_cookie ( const cookie c)
inline

Adds a cookie.

Parameters
cThe cookie.

◆ operator=() [1/2]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
response & malloy::http::response< Body, Fields >::operator= ( const response< Body, Fields > &  rhs)
default

Copy assignment operator.

Parameters
rhsThe object to copy-assign from.
Returns
A reference to the assignee.

◆ operator=() [2/2]

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
response & malloy::http::response< Body, Fields >::operator= ( response< Body, Fields > &&  rhs)
defaultnoexcept

Move assignment operator.

Parameters
rhsThe object to move-assign from.
Returns
A reference to the assignee.

◆ set_status()

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
void malloy::http::response< Body, Fields >::set_status ( http::status  status)
inline

Set the HTTP status code.

Parameters
statusThe HTTP status code.

◆ status()

template<typename Body = boost::beast::http::string_body, typename Fields = boost::beast::http::fields>
http::status malloy::http::response< Body, Fields >::status ( ) const
inline

Retrieve the HTTP status.

Returns
The HTTP status

The documentation for this class was generated from the following file: