virthttp  0.0
libvirt http interface
Public Member Functions | List of all members
URLParser Class Reference

#include <urlparser.hpp>

Inheritance diagram for URLParser:
TargetParser

Public Member Functions

 URLParser (const char *uri) noexcept
 
 URLParser (std::string_view uri) noexcept
 
constexpr URLParser ()=default
 
 URLParser (const URLParser &)=default
 
 URLParser (URLParser &&) noexcept=default
 
 ~URLParser () noexcept=default
 
URLParseroperator= (const URLParser &)=default
 
URLParseroperator= (URLParser &&)=default
 
void setURL (const char *v)
 
void setURL (std::string_view sv)
 
constexpr std::string_view getScheme () const noexcept
 
constexpr std::string_view getHost () const noexcept
 
constexpr unsigned short getPort () const noexcept
 
- Public Member Functions inherited from TargetParser
constexpr TargetParser ()=default
 
 TargetParser (std::string_view url)
 
void setURL (const char *v)
 
void setURL (std::string_view sv)
 
constexpr std::string_view getPath () const noexcept
 
constexpr std::string_view getURL () const noexcept
 
constexpr const flatmap< std::string_view, std::string_view > & getQueries () const noexcept
 
constexpr const std::vector< std::string_view > & getPathParts () const noexcept
 
constexpr std::string_view operator[] (std::string_view key) const noexcept
 
constexpr std::optional< bool > getBool (std::string_view key) const noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from TargetParser
constexpr std::string_view match () noexcept
 
void parse_queries (std::string_view sv_query) noexcept
 
void parse () noexcept
 
- Protected Attributes inherited from TargetParser
std::string_view url {}
 
std::string_view path {}
 
std::vector< std::string_view > path_parts = {}
 
flatmap< std::string_view, std::string_view > queries = {}
 

Constructor & Destructor Documentation

URLParser::URLParser ( const char *  uri)
inlineexplicitnoexcept
URLParser::URLParser ( std::string_view  uri)
inlineexplicitnoexcept
constexpr URLParser::URLParser ( )
default
URLParser::URLParser ( const URLParser )
default
URLParser::URLParser ( URLParser &&  )
defaultnoexcept
URLParser::~URLParser ( )
defaultnoexcept

Member Function Documentation

constexpr std::string_view URLParser::getHost ( ) const
inlinenoexcept
constexpr unsigned short URLParser::getPort ( ) const
inlinenoexcept

Returns the port used in the URL; 0 if no explicit one

constexpr std::string_view URLParser::getScheme ( ) const
inlinenoexcept
URLParser& URLParser::operator= ( const URLParser )
default
URLParser& URLParser::operator= ( URLParser &&  )
default
void URLParser::setURL ( const char *  v)
inline
void URLParser::setURL ( std::string_view  sv)
inline

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