This component implements the following interfaces:
The character set of the channel's content if available and if applicable. This attribute only applies to textual data.
The value of the contentCharset attribute is a mixedcase string.
The length of the data associated with the channel if available. A value of -1 indicates that the content length is unknown.
Callers should prefer getting the "content-length" property as 64-bit value by QIing the channel to nsIPropertyBag2, if that interface is exposed by the channel.
Get/set the content stream
This stream contains the data that will be pushed to the channel's stream listener. If the stream is non-blocking and supports the nsIAsyncInputStream interface, then the stream will be read directly. Otherwise, the stream will be read on a background thread.
This attribute can only be changed before the channel is opened.
The MIME type of the channel's content if available.
NOTE: the content type can often be wrongly specified (e.g., wrong file extension, wrong MIME type, wrong document type stored on a server, etc.), and the caller most likely wants to verify with the actual data.
Setting contentType before the channel has been opened provides a hint to the channel as to what the MIME type is. The channel may ignore this hint in deciding on the actual MIME type that it will report.
Setting contentType after onStartRequest has been fired or after open() is called will override the type determined by the channel.
Setting contentType between the time that asyncOpen() is called and the time when onStartRequest is fired has undefined behavior at this time.
The value of the contentType attribute is a lowercase string. A value assigned to this attribute will be parsed and normalized as follows: 1- any parameters (delimited with a ';') will be stripped. 2- if a charset parameter is given, then its value will replace the the contentCharset attribute of the channel. 3- the stripped contentType will be lowercased. Any implementation of nsIChannel must follow these rules.
The load flags of this request. Bits 0-15 are reserved.
When added to a load group, this request's load flags are merged with the load flags of the load group.
The load group of this request. While pending, the request is a member of the load group. It is the responsibility of the request to implement this policy.
readonly AUTF8String nsIRequest.name
The name of the request. Often this is the URI of the request.
The notification callbacks for the channel. This is set by clients, who wish to provide a means to receive progress, status and protocol-specific notifications. If this value is NULL, the channel implementation may use the notification callbacks from its load group. The channel may also query the notification callbacks from its load group if its notification callbacks do not supply the requested interface.
Interfaces commonly requested include: nsIProgressEventSink, nsIPrompt, and nsIAuthPrompt.
When the channel is done, it must not continue holding references to this object.
NOTE: A channel implementation should take care when "caching" an interface pointer queried from its notification callbacks. If the notification callbacks are changed, then a cached interface pointer may become invalid and may therefore need to be re-queried.
The original URI used to construct the channel. This is used in the case of a redirect or URI "resolution" (e.g. resolving a resource: URI to a file: URI) so that the original pre-redirect URI can still be obtained.
NOTE: this is distinctly different from the http Referer (referring URI), which is typically the page that contained the original URI (accessible from nsIHttpChannel).
The owner, corresponding to the entity that is responsible for this channel. Used by the security manager to grant or deny privileges to mobile code loaded from this channel.
NOTE: this is a strong reference to the owner, so if the owner is also holding a strong reference to the channel, care must be taken to explicitly drop its reference to the channel.
readonly nsISupports nsIChannel.securityInfo
Transport-level security information (if any) corresponding to the channel.
readonly nsresult nsIRequest.status
The error status associated with the request.
readonly nsIURI nsIChannel.URI
The URI corresponding to the channel. Its value is immutable.
Reference documentation is generated from Mozilla's source.