CCF
Loading...
Searching...
No Matches
Public Member Functions | List of all members
http::Request Class Reference

#include <http_builder.h>

Inherits http::Message.

Public Member Functions

 Request (const std::string_view &p="/", llhttp_method m=HTTP_POST)
 
void set_method (llhttp_method m)
 
llhttp_method get_method () const
 
void set_path (const std::string_view &p)
 
std::string get_path () const
 
void set_query_param (const std::string &k, const std::string &v)
 
std::string get_formatted_query () const
 
std::vector< uint8_t > build_request (bool header_only=false) const
 
- Public Member Functions inherited from http::Message
const ccf::http::HeaderMapget_headers () const
 
void set_header (std::string k, const std::string &v)
 
void clear_headers ()
 
size_t get_content_length () const
 
const uint8_t * get_content_data () const
 
void set_body (const std::vector< uint8_t > *b, bool overwrite_content_length=true)
 
void set_body (const uint8_t *b, size_t s, bool overwrite_content_length=true)
 
void set_body (const std::string &s, bool overwrite_content_length=true)
 

Additional Inherited Members

- Protected Member Functions inherited from http::Message
 Message ()=default
 
- Protected Attributes inherited from http::Message
ccf::http::HeaderMap headers
 
const uint8_t * body = nullptr
 
size_t body_size = 0
 

Constructor & Destructor Documentation

◆ Request()

http::Request::Request ( const std::string_view &  p = "/",
llhttp_method  m = HTTP_POST 
)
inline

Member Function Documentation

◆ build_request()

std::vector< uint8_t > http::Request::build_request ( bool  header_only = false) const
inline

◆ get_formatted_query()

std::string http::Request::get_formatted_query ( ) const
inline

◆ get_method()

llhttp_method http::Request::get_method ( ) const
inline

◆ get_path()

std::string http::Request::get_path ( ) const
inline

◆ set_method()

void http::Request::set_method ( llhttp_method  m)
inline

◆ set_path()

void http::Request::set_path ( const std::string_view &  p)
inline

◆ set_query_param()

void http::Request::set_query_param ( const std::string &  k,
const std::string &  v 
)
inline

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