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

#include <http_builder.h>

Inherited by http::Request, and http::Response.

Public Member Functions

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)
 

Protected Member Functions

 Message ()=default
 

Protected Attributes

ccf::http::HeaderMap headers
 
const uint8_t * body = nullptr
 
size_t body_size = 0
 

Constructor & Destructor Documentation

◆ Message()

http::Message::Message ( )
protecteddefault

Member Function Documentation

◆ clear_headers()

void http::Message::clear_headers ( )
inline

◆ get_content_data()

const uint8_t * http::Message::get_content_data ( ) const
inline

◆ get_content_length()

size_t http::Message::get_content_length ( ) const
inline

◆ get_headers()

const ccf::http::HeaderMap & http::Message::get_headers ( ) const
inline

◆ set_body() [1/3]

void http::Message::set_body ( const std::string &  s,
bool  overwrite_content_length = true 
)
inline

◆ set_body() [2/3]

void http::Message::set_body ( const std::vector< uint8_t > *  b,
bool  overwrite_content_length = true 
)
inline

◆ set_body() [3/3]

void http::Message::set_body ( const uint8_t *  b,
size_t  s,
bool  overwrite_content_length = true 
)
inline

◆ set_header()

void http::Message::set_header ( std::string  k,
const std::string &  v 
)
inline

Member Data Documentation

◆ body

const uint8_t* http::Message::body = nullptr
protected

◆ body_size

size_t http::Message::body_size = 0
protected

◆ headers

ccf::http::HeaderMap http::Message::headers
protected

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