Project Alice
Loading...
Searching...
No Matches
httplib::Request Struct Reference

#include <httplib.h>

Public Member Functions

bool has_header (const std::string &key) const
 
std::string get_header_value (const std::string &key, const char *def="", size_t id=0) const
 
uint64_t get_header_value_u64 (const std::string &key, uint64_t def=0, 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)
 
bool has_param (const std::string &key) const
 
std::string get_param_value (const std::string &key, size_t id=0) const
 
size_t get_param_value_count (const std::string &key) const
 
bool is_multipart_form_data () const
 
bool has_file (const std::string &key) const
 
MultipartFormData get_file_value (const std::string &key) const
 
std::vector< MultipartFormDataget_file_values (const std::string &key) const
 

Public Attributes

std::string method
 
std::string path
 
Headers headers
 
std::string body
 
std::string remote_addr
 
int remote_port = -1
 
std::string local_addr
 
int local_port = -1
 
std::string version
 
std::string target
 
Params params
 
MultipartFormDataMap files
 
Ranges ranges
 
Match matches
 
std::unordered_map< std::string, std::string > path_params
 
ResponseHandler response_handler
 
ContentReceiverWithProgress content_receiver
 
Progress progress
 
size_t redirect_count_ = CPPHTTPLIB_REDIRECT_MAX_COUNT
 
size_t content_length_ = 0
 
ContentProvider content_provider_
 
bool is_chunked_content_provider_ = false
 
size_t authorization_count_ = 0
 

Detailed Description

Definition at line 614 of file httplib.h.

Member Function Documentation

◆ get_file_value()

MultipartFormData httplib::Request::get_file_value ( const std::string &  key) const
inline

Definition at line 5725 of file httplib.h.

◆ get_file_values()

std::vector< MultipartFormData > httplib::Request::get_file_values ( const std::string &  key) const
inline

Definition at line 5732 of file httplib.h.

◆ get_header_value()

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

Definition at line 5681 of file httplib.h.

◆ get_header_value_count()

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

Definition at line 5686 of file httplib.h.

◆ get_header_value_u64()

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

Definition at line 2036 of file httplib.h.

Here is the call graph for this function:

◆ get_param_value()

std::string httplib::Request::get_param_value ( const std::string &  key,
size_t  id = 0 
) const
inline

Definition at line 5702 of file httplib.h.

◆ get_param_value_count()

size_t httplib::Request::get_param_value_count ( const std::string &  key) const
inline

Definition at line 5711 of file httplib.h.

◆ has_file()

bool httplib::Request::has_file ( const std::string &  key) const
inline

Definition at line 5721 of file httplib.h.

◆ has_header()

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

Definition at line 5677 of file httplib.h.

◆ has_param()

bool httplib::Request::has_param ( const std::string &  key) const
inline

Definition at line 5698 of file httplib.h.

◆ is_multipart_form_data()

bool httplib::Request::is_multipart_form_data ( ) const
inline

Definition at line 5716 of file httplib.h.

◆ set_header()

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

Definition at line 5691 of file httplib.h.

Member Data Documentation

◆ authorization_count_

size_t httplib::Request::authorization_count_ = 0

Definition at line 665 of file httplib.h.

◆ body

std::string httplib::Request::body

Definition at line 618 of file httplib.h.

◆ content_length_

size_t httplib::Request::content_length_ = 0

Definition at line 662 of file httplib.h.

◆ content_provider_

ContentProvider httplib::Request::content_provider_

Definition at line 663 of file httplib.h.

◆ content_receiver

ContentReceiverWithProgress httplib::Request::content_receiver

Definition at line 636 of file httplib.h.

◆ files

MultipartFormDataMap httplib::Request::files

Definition at line 629 of file httplib.h.

◆ headers

Headers httplib::Request::headers

Definition at line 617 of file httplib.h.

◆ is_chunked_content_provider_

bool httplib::Request::is_chunked_content_provider_ = false

Definition at line 664 of file httplib.h.

◆ local_addr

std::string httplib::Request::local_addr

Definition at line 622 of file httplib.h.

◆ local_port

int httplib::Request::local_port = -1

Definition at line 623 of file httplib.h.

◆ matches

Match httplib::Request::matches

Definition at line 631 of file httplib.h.

◆ method

std::string httplib::Request::method

Definition at line 615 of file httplib.h.

◆ params

Params httplib::Request::params

Definition at line 628 of file httplib.h.

◆ path

std::string httplib::Request::path

Definition at line 616 of file httplib.h.

◆ path_params

std::unordered_map<std::string, std::string> httplib::Request::path_params

Definition at line 632 of file httplib.h.

◆ progress

Progress httplib::Request::progress

Definition at line 637 of file httplib.h.

◆ ranges

Ranges httplib::Request::ranges

Definition at line 630 of file httplib.h.

◆ redirect_count_

size_t httplib::Request::redirect_count_ = CPPHTTPLIB_REDIRECT_MAX_COUNT

Definition at line 661 of file httplib.h.

◆ remote_addr

std::string httplib::Request::remote_addr

Definition at line 620 of file httplib.h.

◆ remote_port

int httplib::Request::remote_port = -1

Definition at line 621 of file httplib.h.

◆ response_handler

ResponseHandler httplib::Request::response_handler

Definition at line 635 of file httplib.h.

◆ target

std::string httplib::Request::target

Definition at line 627 of file httplib.h.

◆ version

std::string httplib::Request::version

Definition at line 626 of file httplib.h.


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