httpmockserver
Public Member Functions | Public Attributes | List of all members
httpmock::MockServer::Response Struct Reference

Response object. More...

#include <mock_server.h>

Public Member Functions

 Response (int status=200, const std::string &body="OK")
 
ResponseaddHeader (const Header &h)
 Add header to the response. More...
 

Public Attributes

int status
 Status code returned to the client. More...
 
std::string body
 Body sent to the client. More...
 
std::vector< Headerheaders
 Response headers. More...
 

Detailed Description

Response object.

Constructor & Destructor Documentation

◆ Response()

httpmock::MockServer::Response::Response ( int  status = 200,
const std::string &  body = "OK" 
)
inlineexplicit

Member Function Documentation

◆ addHeader()

Response& httpmock::MockServer::Response::addHeader ( const Header h)
inline

Add header to the response.

Member Data Documentation

◆ body

std::string httpmock::MockServer::Response::body

Body sent to the client.

◆ headers

std::vector<Header> httpmock::MockServer::Response::headers

Response headers.

◆ status

int httpmock::MockServer::Response::status

Status code returned to the client.


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