pulsatrix 1.1.0
Loading...
Searching...
No Matches
pulsatrix::orch::HttpResponse Struct Reference

An HTTP response. A status of 400 or 500 is a response, not an error. More...

#include <http.hpp>

Public Member Functions

const std::string * header (std::string_view name) const
 The first header named name (any case), or nullptr if there is none.
 
bool ok () const
 

Public Attributes

int status = 0
 
std::vector< std::pair< std::string, std::string > > headers
 Response headers in the order received, names in lowercase.
 
std::string body
 The body. Empty when HttpTransport::stream() delivered it to its callback.
 

Detailed Description

An HTTP response. A status of 400 or 500 is a response, not an error.

Member Function Documentation

◆ header()

const std::string * pulsatrix::orch::HttpResponse::header ( std::string_view  name) const

The first header named name (any case), or nullptr if there is none.

◆ ok()

bool pulsatrix::orch::HttpResponse::ok ( ) const
inline

Member Data Documentation

◆ body

std::string pulsatrix::orch::HttpResponse::body

The body. Empty when HttpTransport::stream() delivered it to its callback.

◆ headers

std::vector<std::pair<std::string, std::string> > pulsatrix::orch::HttpResponse::headers

Response headers in the order received, names in lowercase.

◆ status

int pulsatrix::orch::HttpResponse::status = 0

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