Namespace that holds functions and other objects for working with URLs.
Platform Support
Jaxer Server Framework | Jaxer Client Framework | 1.0 | no |
---|
Functions
Method | Action | Jaxer Server Framework | Jaxer Client Framework | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
static combine(String ...) : String
Combines any number of URL fragments into a single URL, using / as the separator. Before joining two fragments with the separator,
it strips any existing separators on the fragment ends to be joined
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static ensureFileProtocol(String url) : String
If the given URL is already a file-type URL, it's returned untouched. Otherwise we turn it into a file-type URL by prefixing
it with "file://"
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static formUrlDecode(String str) : String
Decode a URL by replacing +'s with spaces and all hex values (%xx) with their character value
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static formUrlEncode(String str) : String
Encode a URL by replacing all special characters with hex values (%xx)
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static hashToQuery(Object hash) : String
Converts an object's properties and property values to a string suitable as a query string. Each property name becomes a key
in the query string and each property value becomes the key value. A key and its value are separated by the '=' character.
Each key/value pair is separated by '&'. Note that each value is encoded so invalid URL characters are encoded properly.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static isFile(String url) : Boolean
Tests whether the given URL is a reasonable file URL rather than something that's available over the network.The test is pretty
simplistic: the URL must start with file://, resource://, or chrome://, or it must contain a backslash (i.e. a Windows filesystem
separator)
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static parseUrl(String url) : Jaxer.Util.Url.ParsedUrl
Parse a string containing a URL into a Jaxer.Util.Url.ParsedUrl object to allow manipulation of the individual URL component
parts
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static parseUrlComponents(String hostAndPort, String absolutePath, [String protocol]) : Jaxer.Util.Url.ParsedUrl
Create a Util.Url.ParsedUrl object from the component pieces provided as parameters to the functions calls.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static queryToHash(String query) : Object
Divides the key/value pairs in a query string and builds an object for these values. The key will become the property name
of the object and the value will become the value of that property
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|