10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::net::curl::LibcurlURL Class Reference

#include <LibcurlURL.h>

Detailed Description

Libcurl-based implementation of tenduke::net::URL.

Inheritance diagram for tenduke::net::curl::LibcurlURL:
tenduke::net::URL

Public Member Functions

 LibcurlURL (bool lenient=true)
 Constructs new instance.
 
std::multimap< std::string, std::string > getQueryParameters () const override
 Returns the query parameters, URL-decoded.
 
std::string getPath () const override
 Returns path, URL-decoded.
 
void setPort (std::uint16_t port) override
 Sets port.
 
std::string toString () const override
 Returns the URL as string.
 
virtual void parse (const std::string &url)
 Parses given URL into this instance.
 

Constructor & Destructor Documentation

◆ LibcurlURL()

tenduke::net::curl::LibcurlURL::LibcurlURL ( bool  lenient = true)
explicit

Constructs new instance.

Parameters
lenientaccept URL-scheme not recognized by libcurl.
Exceptions
std::bad_allocif unable to initialize libcurl

Member Function Documentation

◆ getPath()

std::string tenduke::net::curl::LibcurlURL::getPath ( ) const
overridevirtual

Returns path, URL-decoded.

Returns
-

Implements tenduke::net::URL.

◆ getQueryParameters()

std::multimap< std::string, std::string > tenduke::net::curl::LibcurlURL::getQueryParameters ( ) const
overridevirtual

Returns the query parameters, URL-decoded.

Returns
-
Exceptions
tenduke::net::URLExceptionin case something failed

Implements tenduke::net::URL.

◆ parse()

void tenduke::net::curl::LibcurlURL::parse ( const std::string &  url)
virtual

Parses given URL into this instance.

Parameters
url-
Exceptions
tenduke::net::MalformedURLExceptionif URL malformed
tenduke::net::URLException(or other subclasses) for other parsing reasongs

◆ setPort()

void tenduke::net::curl::LibcurlURL::setPort ( std::uint16_t  port)
overridevirtual

Sets port.

Parameters
port-

Implements tenduke::net::URL.

◆ toString()

std::string tenduke::net::curl::LibcurlURL::toString ( ) const
overridevirtual

Returns the URL as string.

Returns
-

Implements tenduke::net::URL.


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