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

Detailed Description

libcurl based implementation of generic network services.

Classes

class  LibcurlURL
 Libcurl-based implementation of tenduke::net::URL. More...
 
class  LibCurlURLDecoder
 Libcurl implementation of tenduke::net::URLDecoder. More...
 
class  LibCurlURLEncoder
 Libcurl implementation of tenduke::net::URLEncoder. More...
 
class  LibCurlURLParser
 Libcurl implementation of tenduke::net::URLParser. More...
 

Functions

std::multimap< std::string, std::string > parseQueryString (const char *queryString)
 Utility function to parse query string into a map.
 
std::string urlDecode (CURL *curl, const char *encodedString, std::size_t len)
 Decodes given string using given CURL-handle.
 

Function Documentation

◆ parseQueryString()

std::multimap< std::string, std::string > tenduke::net::curl::parseQueryString ( const char *  queryString)

Utility function to parse query string into a map.

Parameters
queryStringthe query string
Returns
query parameters
Exceptions
tenduke::net::URLExceptionif libcurl reported errors

◆ urlDecode()

std::string tenduke::net::curl::urlDecode ( CURL *  curl,
const char *  encodedString,
std::size_t  len 
)

Decodes given string using given CURL-handle.

This assumes that the encoded value decodes to e.g. UTF-8 encoded string.

Parameters
curlthe CURL-handle
encodedStringURL-encoded string
lenlength of the URL-encoded String
Returns
decoded string
Exceptions
tenduke::net::URLExceptionif the decoding failed