Reqboost::Utility namespace

Classes

class LogMessage
class LogSink
class ConsoleSink
class FileSink
class Logger

Enums

enum LogLevel { INFO, WARNING, ERROR }

Functions

auto detect_encoding(std::string _content_string, size_t _content_length) -> std::string
Detect the encoding of a string.
auto parse_header_links(const std::string& value) -> std::vector<std::map<std::string, std::string>>
Parse a header links string into a vector of maps.
auto decode_utf8(const std::string& encoded) -> std::string
Decode a UTF-8 encoded string.
auto urlunparse(const Models::ParsedURL& parsed) -> std::string
Unparse a ParsedURL object into a URL string.
auto urlencode(const std::string& decoded) -> std::string
URL encode a string.
auto urldecode(const std::string& encoded) -> std::string
URL decode a string.
auto urlsplit(const std::string& url) -> Models::ParsedURL
Split a URL into its components.

Variables

const std::string DEFAULT_CA_BUNDLE_PATH

Enum documentation

enum Reqboost::Utility::LogLevel

Function documentation

std::string Reqboost::Utility::detect_encoding(std::string _content_string, size_t _content_length)

Detect the encoding of a string.

Returns The detected encoding of the string.

This function takes a string and detects its encoding.

std::vector<std::map<std::string, std::string>> Reqboost::Utility::parse_header_links(const std::string& value)

Parse a header links string into a vector of maps.

Parameters
value The header links string to parse.
Returns A vector of maps, where each map represents a link.

This function takes a string representing a header links value and parses it into a vector of maps, where each map represents a link.

std::string Reqboost::Utility::decode_utf8(const std::string& encoded)

Decode a UTF-8 encoded string.

Parameters
encoded The UTF-8 encoded string to decode.
Returns The decoded string.

This function takes a UTF-8 encoded string and decodes it into a regular string.

std::string Reqboost::Utility::urlunparse(const Models::ParsedURL& parsed)

Unparse a ParsedURL object into a URL string.

Parameters
parsed The ParsedURL object to unparse.
Returns The URL string.

This function takes a ParsedURL object and unparse it into a URL string.

std::string Reqboost::Utility::urlencode(const std::string& decoded)

URL encode a string.

Parameters
decoded The string to URL encode.
Returns The URL encoded string.

This function takes a string and URL encodes it, replacing special characters with their corresponding escape sequences.

std::string Reqboost::Utility::urldecode(const std::string& encoded)

URL decode a string.

Parameters
encoded The URL encoded string to decode.
Returns The decoded string.

This function takes a URL encoded string and decodes it, replacing escape sequences with their corresponding special characters.

Models::ParsedURL Reqboost::Utility::urlsplit(const std::string& url)

Split a URL into its components.

Parameters
url The URL string to split.
Returns A ParsedURL object representing the URL components.

This function takes a URL string and splits it into its components, returning a ParsedURL object.

Variable documentation

const std::string Reqboost::Utility::DEFAULT_CA_BUNDLE_PATH