userver: userver/http/url.hpp File Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
url.hpp File Reference

Detailed Description

URL manipulation functions.

Definition in file url.hpp.

Go to the source code of this file.

#include <map>
#include <string>
#include <string_view>
#include <unordered_map>
#include <userver/utils/impl/internal_tag_fwd.hpp>
#include <userver/utils/str_icase.hpp>
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  http
 HTTP helpers.
 

Typedefs

using http::Args = std::unordered_map<std::string, std::string, utils::StrCaseHash>
 
using http::MultiArgs = std::multimap<std::string, std::string>
 

Functions

std::string http::UrlDecode (std::string_view range)
 Decode URL.
 
std::string http::UrlEncode (std::string_view input_string)
 Encode as URL.
 
std::string http::MakeQuery (const Args &query_args)
 Make an URL query.
 
std::string http::MakeQuery (const MultiArgs &query_args)
 Make an URL query.
 
std::string http::MakeQuery (const std::unordered_map< std::string, std::string > &query_args)
 Make an URL query.
 
std::string http::MakeQuery (std::initializer_list< std::pair< std::string_view, std::string_view > > query_args)
 Make an URL query.
 
std::string http::MakeUrl (std::string_view path, const Args &query_args)
 Make an URL with query arguments.
 
std::string http::MakeUrl (std::string_view path, const std::unordered_map< std::string, std::string > &query_args)
 Make an URL with query arguments.
 
std::string http::MakeUrl (std::string_view path, const Args &query_args, MultiArgs query_multiargs)
 Make an URL with query arguments.
 
std::string http::MakeUrl (std::string_view path, std::initializer_list< std::pair< std::string_view, std::string_view > > query_args)
 Make an URL with query arguments.
 
std::string http::ExtractMetaTypeFromUrl (const std::string &url)
 Returns URL part before the first '?' character.
 
std::string http::ExtractPath (std::string_view url)
 Returns HTTP path part of a URL.
 
std::string http::ExtractHostname (std::string_view url)
 Returns hostname part of a URL.