olp-cpp-sdk  1.22.0
Static Public Member Functions | List of all members
olp::utils::Url Class Reference

Builds and parses URLs. More...

#include <Url.h>

Static Public Member Functions

static std::string Decode (const std::string &in)
 Decodes a URL on a given input string by replacing percent-encoded characters with actual ones. More...
 
static std::string Encode (const std::string &in)
 Encodes a given input string by escaping non-ASCII characters. More...
 
static std::string Construct (const std::string &base, const std::string &path, const std::multimap< std::string, std::string > &query_params)
 Produces a full URL from a URL base, path, and query parameters. More...
 

Detailed Description

Builds and parses URLs.

Member Function Documentation

◆ Construct()

static std::string olp::utils::Url::Construct ( const std::string &  base,
const std::string &  path,
const std::multimap< std::string, std::string > &  query_params 
)
static

Produces a full URL from a URL base, path, and query parameters.

Parameters
baseThe base of the URL.
pathThe path part of the URL.
query_paramsThe multimap of query parameters.
Returns
The URL-encoded result string.

◆ Decode()

static std::string olp::utils::Url::Decode ( const std::string &  in)
static

Decodes a URL on a given input string by replacing percent-encoded characters with actual ones.

Parameters
inThe URL-encoded string.
Returns
The URL-decoded result string.

◆ Encode()

static std::string olp::utils::Url::Encode ( const std::string &  in)
static

Encodes a given input string by escaping non-ASCII characters.

Parameters
inThe URL string to be encoded.
Returns
The URL-encoded result string.

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