SW Task Event Loop Framework v1.0.0
High-performance C++ asynchronous event loop framework with timer management and promise-based programming
Loading...
Searching...
No Matches
sw_task::net::HttpResponse Struct Reference

#include <HttpService.h>

Collaboration diagram for sw_task::net::HttpResponse:
Collaboration graph

Public Member Functions

bool ok () const
 

Public Attributes

long statusCode {0}
 
std::string body
 
std::string effectiveUrl
 
std::unordered_map< std::string, std::string > headers
 
std::optional< HttpErrorerror
 
double elapsedMs {0.0}
 

Detailed Description

Definition at line 35 of file HttpService.h.

Member Function Documentation

◆ ok()

bool sw_task::net::HttpResponse::ok ( ) const
inline

Definition at line 43 of file HttpService.h.

References error, and statusCode.

Member Data Documentation

◆ body

std::string sw_task::net::HttpResponse::body

Definition at line 37 of file HttpService.h.

◆ effectiveUrl

std::string sw_task::net::HttpResponse::effectiveUrl

Definition at line 38 of file HttpService.h.

◆ elapsedMs

double sw_task::net::HttpResponse::elapsedMs {0.0}

Definition at line 41 of file HttpService.h.

◆ error

std::optional<HttpError> sw_task::net::HttpResponse::error

Definition at line 40 of file HttpService.h.

Referenced by ok().

◆ headers

std::unordered_map<std::string,std::string> sw_task::net::HttpResponse::headers

Definition at line 39 of file HttpService.h.

◆ statusCode

long sw_task::net::HttpResponse::statusCode {0}

Definition at line 36 of file HttpService.h.

Referenced by ok().


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