Goby3  3.1.5
2024.05.14
httplib::Response Struct Reference

#include <goby/util/thirdparty/cpp-httplib/httplib.h>

Public Member Functions

bool has_header (const std::string &key) const
 
std::string get_header_value (const std::string &key, size_t id=0) const
 
uint64_t get_header_value_u64 (const std::string &key, size_t id=0) const
 
size_t get_header_value_count (const std::string &key) const
 
void set_header (const std::string &key, const std::string &val)
 
void set_redirect (const std::string &url, int status=302)
 
void set_content (const char *s, size_t n, const std::string &content_type)
 
void set_content (const std::string &s, const std::string &content_type)
 
void set_content_provider (size_t length, const std::string &content_type, ContentProvider provider, ContentProviderResourceReleaser resource_releaser=nullptr)
 
void set_content_provider (const std::string &content_type, ContentProviderWithoutLength provider, ContentProviderResourceReleaser resource_releaser=nullptr)
 
void set_chunked_content_provider (const std::string &content_type, ContentProviderWithoutLength provider, ContentProviderResourceReleaser resource_releaser=nullptr)
 
 Response ()=default
 
 Response (const Response &)=default
 
Responseoperator= (const Response &)=default
 
 Response (Response &&)=default
 
Responseoperator= (Response &&)=default
 
 ~Response ()
 

Public Attributes

std::string version
 
int status = -1
 
std::string reason
 
Headers headers
 
std::string body
 
std::string location
 
size_t content_length_ = 0
 
ContentProvider content_provider_
 
ContentProviderResourceReleaser content_provider_resource_releaser_
 
bool is_chunked_content_provider_ = false
 
bool content_provider_success_ = false
 

Detailed Description

Definition at line 525 of file httplib.h.

Constructor & Destructor Documentation

◆ Response() [1/3]

httplib::Response::Response ( )
default

◆ Response() [2/3]

httplib::Response::Response ( const Response )
default

◆ Response() [3/3]

httplib::Response::Response ( Response &&  )
default

◆ ~Response()

httplib::Response::~Response ( )
inline

Definition at line 561 of file httplib.h.

Member Function Documentation

◆ get_header_value()

std::string httplib::Response::get_header_value ( const std::string &  key,
size_t  id = 0 
) const
inline

Definition at line 5830 of file httplib.h.

◆ get_header_value_count()

size_t httplib::Response::get_header_value_count ( const std::string &  key) const
inline

Definition at line 5835 of file httplib.h.

◆ get_header_value_u64()

uint64_t httplib::Response::get_header_value_u64 ( const std::string &  key,
size_t  id = 0 
) const
inline

Definition at line 1683 of file httplib.h.

◆ has_header()

bool httplib::Response::has_header ( const std::string &  key) const
inline

Definition at line 5825 of file httplib.h.

◆ operator=() [1/2]

Response& httplib::Response::operator= ( const Response )
default

◆ operator=() [2/2]

Response& httplib::Response::operator= ( Response &&  )
default

◆ set_chunked_content_provider()

void httplib::Response::set_chunked_content_provider ( const std::string &  content_type,
ContentProviderWithoutLength  provider,
ContentProviderResourceReleaser  resource_releaser = nullptr 
)
inline

Definition at line 5905 of file httplib.h.

◆ set_content() [1/2]

void httplib::Response::set_content ( const char s,
size_t  n,
const std::string &  content_type 
)
inline

Definition at line 5865 of file httplib.h.

◆ set_content() [2/2]

void httplib::Response::set_content ( const std::string &  s,
const std::string &  content_type 
)
inline

Definition at line 5874 of file httplib.h.

◆ set_content_provider() [1/2]

void httplib::Response::set_content_provider ( const std::string &  content_type,
ContentProviderWithoutLength  provider,
ContentProviderResourceReleaser  resource_releaser = nullptr 
)
inline

Definition at line 5893 of file httplib.h.

◆ set_content_provider() [2/2]

void httplib::Response::set_content_provider ( size_t  length,
const std::string &  content_type,
ContentProvider  provider,
ContentProviderResourceReleaser  resource_releaser = nullptr 
)
inline

Definition at line 5879 of file httplib.h.

◆ set_header()

void httplib::Response::set_header ( const std::string &  key,
const std::string &  val 
)
inline

Definition at line 5841 of file httplib.h.

◆ set_redirect()

void httplib::Response::set_redirect ( const std::string &  url,
int  status = 302 
)
inline

Definition at line 5849 of file httplib.h.

Member Data Documentation

◆ body

std::string httplib::Response::body

Definition at line 531 of file httplib.h.

◆ content_length_

size_t httplib::Response::content_length_ = 0

Definition at line 570 of file httplib.h.

◆ content_provider_

ContentProvider httplib::Response::content_provider_

Definition at line 571 of file httplib.h.

◆ content_provider_resource_releaser_

ContentProviderResourceReleaser httplib::Response::content_provider_resource_releaser_

Definition at line 572 of file httplib.h.

◆ content_provider_success_

bool httplib::Response::content_provider_success_ = false

Definition at line 574 of file httplib.h.

◆ headers

Headers httplib::Response::headers

Definition at line 530 of file httplib.h.

◆ is_chunked_content_provider_

bool httplib::Response::is_chunked_content_provider_ = false

Definition at line 573 of file httplib.h.

◆ location

std::string httplib::Response::location

Definition at line 532 of file httplib.h.

◆ reason

std::string httplib::Response::reason

Definition at line 529 of file httplib.h.

◆ status

int httplib::Response::status = -1

Definition at line 528 of file httplib.h.

◆ version

std::string httplib::Response::version

Definition at line 527 of file httplib.h.


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