nsIStandardURL defines the interface to an URL with the standard file path format common to protocols like http, ftp, and file. It supports initialization from a relative path and provides some customization on how URLs are normalized. @status UNDER_REVIEW
[scriptable, uuid(babd6cca-ebe7-4329-967c-d6b9e33caa81)]
Constants
blah:foo/bar => blah://foo/bar blah:/foo/bar => blah:///foo/bar blah://foo/bar => blah://foo/bar blah:///foo/bar => blah:///foo/bar
blah:foo/bar => blah://foo/bar blah:/foo/bar => blah://foo/bar blah://foo/bar => blah://foo/bar blah:///foo/bar => blah://foo/bar
Methods
Initialize a standard URL.
@param aUrlType - one of the URLTYPE_ flags listed above.
@param aDefaultPort - if the port parsed from the URL string matches
this port, then the port will be removed from the
canonical form of the URL.
@param aSpec - URL string.
@param aOriginCharset - the charset from which this URI string
originated. this corresponds to the charset
that should be used when communicating this
URI to an origin server, for example. if
null, then provide aBaseURI implements this
interface, the origin charset of aBaseURI will
be assumed, otherwise defaulting to UTF-8 (i.e.,
no charset transformation from aSpec).
@param aBaseURI - if null, aSpec must specify an absolute URI.
otherwise, aSpec will be resolved relative
to aBaseURI.
void
init(in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI)
Compare to: