@mozilla.org/network/simple-uri;1

This component implements the following interfaces:

Properties

readonly ACString nsIURI.asciiHost

The URI host with an ASCII compatible encoding. Follows the IDNA draft spec for converting internationalized domain names (UTF-8) to ASCII for compatibility with existing internet infrasture.

readonly ACString nsIURI.asciiSpec

The URI spec with an ASCII compatible encoding. Host portion follows the IDNA draft spec. Other parts are URL-escaped per the rules of RFC2396. The result is strictly ASCII.

AUTF8String nsIURI.host

The host is the internet domain name to which this URI refers. It could be an IPv4 (or IPv6) address literal. If supported, it could be a non-ASCII internationalized domain name.

Characters are NOT escaped.

AUTF8String nsIURI.hostPort

The host:port (or simply the host, if port == -1).

Characters are NOT escaped.

readonly ACString nsIURI.originCharset

The charset of the document from which this URI originated. An empty value implies UTF-8.

If this value is something other than UTF-8 then the URI components (e.g., spec, prePath, username, etc.) will all be fully URL-escaped. Otherwise, the URI components may contain unescaped multibyte UTF-8 characters.

AUTF8String nsIURI.password

AUTF8String nsIURI.path

The path, typically including at least a leading '/' (but may also be empty, depending on the protocol).

Some characters may be escaped.

PRInt32 nsIURI.port

A port value of -1 corresponds to the protocol's default port (eg. -1 implies port 80 for http URIs).

readonly AUTF8String nsIURI.prePath

The prePath (eg. scheme://user:password@host:port) returns the string before the path. This is useful for authentication or managing sessions.

Some characters may be escaped.

ACString nsIURI.scheme

The Scheme is the protocol to which this URI refers. The scheme is restricted to the US-ASCII charset per RFC2396.

AUTF8String nsIURI.spec

Returns a string representation of the URI. Setting the spec causes the new spec to be parsed, initializing the URI.

Some characters may be escaped.

AUTF8String nsIURI.username

The optional username and password, assuming the preHost consists of username:password.

Some characters may be escaped.

AUTF8String nsIURI.userPass

The username:password (or username only if value doesn't contain a ':')

Some characters may be escaped.

Methods

InterfaceMethod
nsIURI nsIURI clone ( )
nsIURI PRBool equals ( nsIURI other )
nsISerializable void read ( nsIObjectInputStream inputStream )
nsIURI AUTF8String resolve ( AUTF8String relativePath )
nsIURI PRBool schemeIs ( char* scheme )
nsISerializable void write ( nsIObjectOutputStream outputStream )

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com