Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

UrlInfo

 

struct UrlInfo

Parses URL into parts and provides easy access to query parameters.

 

Public Member List

 

Example values are based on parsing URL

 

http://username:password@hostname:9090/path?arg=value&aarg[]=item1&aarg[]=item2#anchor

 


 

String url

Original url.

 


 

String scheme

URL scheme: http

 


 

String host

Host: hostname

 


 

String port

Port: 9090

 


 

String username

Authentication username: username

 


 

String password

Authentication password: password

 


 

String path

Path: /path

 


 

String query

Query: arg=value&aarg[]=item1&aarg[]=item2

 


 

String fragment

Fragment: anchor

 


 

VectorMap<String, Stringparameters

Scalar query parameters: {"arg": "value"}

 


 

VectorMap<String, Vector<String>> array_parameters

Array query parameters: {"aarg": ["item1", "item2"]}

 


 

void Clear()

Clears the URL to initial states (everything is empty).

 


 

void Parse(const String& url)

Parses url.

 


 

String operator[](const char *idconst

Returns value of scalar parameter or empty string if not present.

 


 

const Vector<String>& GetArray(const char *idconst

Returns reference to array parameter or reference to empty array if not present.

 


 

UrlInfo(const String& url)

Constructs UrlInfo by parsing url.

 

 

Last edit by klugier on 06/12/2016. Do you want to contribute?. T++