|
| NPT_HttpUrl (const char *host, NPT_UInt16 port, const char *path, const char *query=NULL, const char *fragment=NULL) |
|
| NPT_HttpUrl (const char *url, bool ignore_scheme=false) |
|
NPT_String | ToString (bool with_fragment=true) const override |
| Return the string representation of the URL. More...
|
|
| NPT_Url () |
| Default constructor. More...
|
|
| NPT_Url (const char *url, NPT_UInt16 default_port=0) |
| Construct a URL by parsing an input string in its fully encoded form. More...
|
|
| NPT_Url (const char *scheme, const char *host, NPT_UInt16 port, const char *path, const char *query=NULL, const char *fragment=NULL) |
| Construct a URL from its components. More...
|
|
NPT_Result | Parse (const char *url, NPT_UInt16 default_port=0) |
| Parse a URL from its fully encoded form. More...
|
|
NPT_Result | ParsePathPlus (const char *path_plus) |
| Parse just the path plus optional query and fragment from a fully encoded form. More...
|
|
const NPT_String & | GetHost () const |
| Returns the host part of the URL, in its encoded form.
|
|
NPT_UInt16 | GetPort () const |
| Returns the port number of the URL.
|
|
const NPT_String & | GetPath () const |
| Returns the path part of the URL, in its encoded form.
|
|
NPT_String | GetPath (bool decoded) const |
| Returns the path part of the URL, in its encoded or decoded form.
|
|
const NPT_String & | GetQuery () const |
| Returns the query part of the URL, in its encoded form.
|
|
const NPT_String & | GetFragment () const |
| Returns the fragment part of the URL, in its encoded form.
|
|
virtual bool | IsValid () const |
| Returns whether the URL is valid or not. More...
|
|
void | Reset () |
| Resets a URL to an uninitialized state.
|
|
bool | HasQuery () const |
| Returns whether the URL has a query part or not. More...
|
|
bool | HasFragment () const |
| Returns whether the URL has a fragment part or not. More...
|
|
NPT_Result | SetHost (const char *host) |
| Sets the host part of the URL. More...
|
|
NPT_Result | SetPort (NPT_UInt16 port) |
| Sets the port number of the URL. More...
|
|
NPT_Result | SetPath (const char *path, bool encoded=false) |
| Sets the path part of the URL. More...
|
|
NPT_Result | SetQuery (const char *query, bool encoded=false) |
| Sets the query part of the URL. More...
|
|
NPT_Result | SetFragment (const char *fragment, bool encoded=false) |
| Sets the fragment part of the URL. More...
|
|
virtual NPT_String | ToRequestString (bool with_fragment=false) const |
| Return the string representation of the URL in a way that can be used in an HTTP request (i.e just the portion of the URL starting with the path) More...
|
|
virtual NPT_String | ToStringWithDefaultPort (NPT_UInt16 default_port, bool with_fragment=true) const |
| Return the string representation of the URL. More...
|
|
const NPT_String & | GetScheme () const |
|
void | SetScheme (const char *scheme) |
|
NPT_Result | SetSchemeFromUri (const char *uri) |
|
SchemeId | GetSchemeId () const |
|
|
enum | SchemeId { SCHEME_ID_UNKNOWN,
SCHEME_ID_HTTP,
SCHEME_ID_HTTPS
} |
|
static NPT_String | PercentEncode (const char *str, const char *chars, bool encode_percents=true) |
|
static NPT_String | PercentDecode (const char *str) |
|
static SchemeId | ParseScheme (const NPT_String &scheme) |
|
static const char *const | PathCharsToEncode = NPT_URI_ALWAYS_ENCODE "?#[]" |
|
static const char *const | QueryCharsToEncode = NPT_URI_ALWAYS_ENCODE "#[]" |
|
static const char *const | FragmentCharsToEncode = NPT_URI_ALWAYS_ENCODE "[]" |
|
static const char *const | UnsafeCharsToEncode = NPT_URI_ALWAYS_ENCODE |
|
NPT_String | m_Host |
|
bool | m_HostIsIpv6Address |
|
NPT_UInt16 | m_Port |
|
NPT_String | m_Path |
|
bool | m_HasQuery |
|
NPT_String | m_Query |
|
bool | m_HasFragment |
|
NPT_String | m_Fragment |
|
NPT_String | m_Scheme |
|
SchemeId | m_SchemeId |
|