Response Struct Reference

#include <RobotAPI/libraries/armem/server/ltm/detail/mixins/util/httplib.h>

Public Member Functions

std::string get_header_value (const std::string &key, const char *def="", size_t id=0) const
 
size_t get_header_value_count (const std::string &key) const
 
uint64_t get_header_value_u64 (const std::string &key, uint64_t def=0, size_t id=0) const
 
bool has_header (const std::string &key) const
 
Responseoperator= (const Response &)=default
 
Responseoperator= (Response &&)=default
 
 Response ()=default
 
 Response (const Response &)=default
 
 Response (Response &&)=default
 
void set_chunked_content_provider (const std::string &content_type, ContentProviderWithoutLength provider, ContentProviderResourceReleaser resource_releaser=nullptr)
 
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 (std::string &&s, const std::string &content_type)
 
void set_content_provider (const std::string &content_type, ContentProviderWithoutLength provider, ContentProviderResourceReleaser resource_releaser=nullptr)
 
void set_content_provider (size_t length, const std::string &content_type, ContentProvider provider, ContentProviderResourceReleaser resource_releaser=nullptr)
 
void set_file_content (const std::string &path)
 
void set_file_content (const std::string &path, const std::string &content_type)
 
void set_header (const std::string &key, const std::string &val)
 
void set_redirect (const std::string &url, int status=StatusCode::Found_302)
 
 ~Response ()
 

Public Attributes

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

Detailed Description

Definition at line 666 of file httplib.h.

Constructor & Destructor Documentation

◆ Response() [1/3]

Response ( )
default

◆ Response() [2/3]

Response ( const Response )
default

◆ Response() [3/3]

Response ( Response &&  )
default

◆ ~Response()

~Response ( )
inline

Definition at line 708 of file httplib.h.

Member Function Documentation

◆ get_header_value()

std::string get_header_value ( const std::string &  key,
const char *  def = "",
size_t  id = 0 
) const
inline

Definition at line 5744 of file httplib.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_header_value_count()

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

Definition at line 5750 of file httplib.h.

+ Here is the call graph for this function:

◆ get_header_value_u64()

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

Definition at line 2034 of file httplib.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ has_header()

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

Definition at line 5740 of file httplib.h.

+ Here is the caller graph for this function:

◆ operator=() [1/2]

Response& operator= ( const Response )
default

◆ operator=() [2/2]

Response& operator= ( Response &&  )
default

◆ set_chunked_content_provider()

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

Definition at line 5816 of file httplib.h.

◆ set_content() [1/3]

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

Definition at line 5773 of file httplib.h.

+ Here is the call graph for this function:

◆ set_content() [2/3]

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

Definition at line 5782 of file httplib.h.

+ Here is the call graph for this function:

◆ set_content() [3/3]

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

Definition at line 5787 of file httplib.h.

+ Here is the call graph for this function:

◆ set_content_provider() [1/2]

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

Definition at line 5806 of file httplib.h.

◆ set_content_provider() [2/2]

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

Definition at line 5796 of file httplib.h.

+ Here is the caller graph for this function:

◆ set_file_content() [1/2]

void set_file_content ( const std::string &  path)
inline

Definition at line 5832 of file httplib.h.

◆ set_file_content() [2/2]

void set_file_content ( const std::string &  path,
const std::string &  content_type 
)
inline

Definition at line 5826 of file httplib.h.

◆ set_header()

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

Definition at line 5755 of file httplib.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_redirect()

void set_redirect ( const std::string &  url,
int  status = StatusCode::Found_302 
)
inline

Definition at line 5762 of file httplib.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ body

std::string body

Definition at line 671 of file httplib.h.

◆ content_length_

size_t content_length_ = 0

Definition at line 715 of file httplib.h.

◆ content_provider_

ContentProvider content_provider_

Definition at line 716 of file httplib.h.

◆ content_provider_resource_releaser_

ContentProviderResourceReleaser content_provider_resource_releaser_

Definition at line 717 of file httplib.h.

◆ content_provider_success_

bool content_provider_success_ = false

Definition at line 719 of file httplib.h.

◆ file_content_content_type_

std::string file_content_content_type_

Definition at line 721 of file httplib.h.

◆ file_content_path_

std::string file_content_path_

Definition at line 720 of file httplib.h.

◆ headers

Headers headers

Definition at line 670 of file httplib.h.

◆ is_chunked_content_provider_

bool is_chunked_content_provider_ = false

Definition at line 718 of file httplib.h.

◆ location

std::string location

Definition at line 672 of file httplib.h.

◆ reason

std::string reason

Definition at line 669 of file httplib.h.

◆ status

int status = -1

Definition at line 668 of file httplib.h.

◆ version

std::string version

Definition at line 667 of file httplib.h.


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