Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
orbit::http::ClientResponse Struct Reference

The result of a ClientRequest. More...

#include <Client.hpp>

Public Member Functions

bool ok () const
 True if a response arrived (any status, including 4xx and 5xx).
 
std::optional< std::string > header (std::string_view name) const
 The last header named name (case-insensitive).
 

Public Attributes

long status = 0
 0 if no response arrived
 
std::vector< std::pair< std::string, std::string > > headers
 Of the final response.
 
std::string body
 
std::string effective_url
 After redirects.
 
std::string error
 Empty on success.
 

Detailed Description

The result of a ClientRequest.

Member Function Documentation

◆ header()

std::optional< std::string > orbit::http::ClientResponse::header ( std::string_view  name) const

The last header named name (case-insensitive).

◆ ok()

bool orbit::http::ClientResponse::ok ( ) const
inline

True if a response arrived (any status, including 4xx and 5xx).

Member Data Documentation

◆ body

std::string orbit::http::ClientResponse::body

◆ effective_url

std::string orbit::http::ClientResponse::effective_url

After redirects.

◆ error

std::string orbit::http::ClientResponse::error

Empty on success.

◆ headers

std::vector<std::pair<std::string, std::string> > orbit::http::ClientResponse::headers

Of the final response.

◆ status

long orbit::http::ClientResponse::status = 0

0 if no response arrived


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