Public Member Functions | |
URI (String uri) | |
Construct a URI object from the string url. | |
String | parse (String url) |
Equivalent to calling burst.URI.parse on the string url member of the object. | |
Static Public Member Functions | |
Object | queryToMap (String s, String dup_handling) |
Parse the url query string (which excludes any leading '?'). | |
Array | queryToPairs (String s) |
Parse the query string into an Array of 2-element Arrays. | |
Array | queryToArray (String s) |
Parse the query string into an Array with alternating names and values. | |
String | mapToQuery (Object map) |
Produce a query string (without leading '?') from an associative array. | |
boolean | isAbsolute (String url) |
True if the url is absolute. | |
String | resolveUrl (String url, String base_url, Boolean noabscheck) |
Resolve the url relative to the provide base_url. | |
String | parse (String url) |
Parses the url into an Array of 5 Strings. | |
String | pathSuffix (String url) |
Extracts the path part, and from that the file suffix. | |
String | guessMimeType (String url) |
Guess the MIME type (such as 'text/plain' based on the file suffix in the url (such as '.txt'). |
|
Guess the MIME type (such as 'text/plain' based on the file suffix in the url (such as '.txt'). Returns empty string if can't guess. |
|
Parses the url into an Array of 5 Strings.
|
|
Extracts the path part, and from that the file suffix. Returns the empty string if none. |
|
Parse the url query string (which excludes any leading '?'). If the same name appears multiple times, the behavior is determined by the dup_handling parameter, which can be: 'first', 'last', 'array', 'error' The default is 'last' |
|
Resolve the url relative to the provide base_url. The url is just returned if it is already absolute. RFC2396 specifies relative urls: http://www.faqs.org/rfcs/rfc2396.html This supplants RFC1808. TBD: As special case, if url starts with '/', and base url is absolute, a url is returned which is made by replacing the base url's pathinfo. This is not valid.
|