Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
 
Loading...
Searching...
No Matches
dcn::http::Response Class Reference

#include <http.hpp>

Inheritance diagram for dcn::http::Response:
dcn::http::MessageBase

Public Member Functions

 Response ()=default
 
 Response (Response &&other)=default
 
Responseoperator= (Response &&other)=default
 
 Response (const Response &other)=delete
 
Responseoperator= (const Response &other)=delete
 
 ~Response ()=default
 
ResponsesetCode (Code code)
 Sets the HTTP response code of the message.
 
const CodegetCode () const
 Gets the HTTP response code of the message.
 
- Public Member Functions inherited from dcn::http::MessageBase
 MessageBase ()
 
 MessageBase (MessageBase &&other)=default
 
MessageBaseoperator= (MessageBase &&other)=default
 
 MessageBase (const MessageBase &other)=delete
 
MessageBaseoperator= (const MessageBase &other)=delete
 
virtual ~MessageBase ()=default
 
MessageBasesetVersion (const std::string &version)
 Sets the HTTP version of the message.
 
MessageBasesetBody (const std::string &body)
 Sets the body of the message.
 
MessageBasesetBodyWithContentLength (const std::string &body)
 Sets the body of the message.
 
MessageBaseaddHeader (Header header, const std::string &value)
 Adds a header to the message.
 
MessageBasesetHeader (Header header, const std::string &value)
 Set a header in the message.
 
std::vector< std::string > getHeader (Header header) const
 Gets the value of a header.
 
const std::string & getVersion () const
 Gets the version of the message.
 
const HeadersListgetHeaders () const
 Gets the headers of the message.
 
const std::string & getBody () const
 Gets the body of the message.
 

Constructor & Destructor Documentation

◆ Response() [1/3]

dcn::http::Response::Response ( )
default

◆ Response() [2/3]

dcn::http::Response::Response ( Response &&  other)
default

◆ Response() [3/3]

dcn::http::Response::Response ( const Response other)
delete

◆ ~Response()

dcn::http::Response::~Response ( )
default

Member Function Documentation

◆ getCode()

const Code & dcn::http::Response::getCode ( ) const

Gets the HTTP response code of the message.

Returns
The response code of the message.

◆ operator=() [1/2]

Response & dcn::http::Response::operator= ( const Response other)
delete

◆ operator=() [2/2]

Response & dcn::http::Response::operator= ( Response &&  other)
default

◆ setCode()

Response & dcn::http::Response::setCode ( Code  code)

Sets the HTTP response code of the message.

Parameters
[in]codeThe response code to set.

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