Enable/Disable use of Alternate Services with this channel. The network.http.altsvc.enabled preference is still a pre-requisite.
Enable/Disable HTTP3 negotiation on per channel basis. The network.http.http3.enable preference is still a pre-requisite for starting HTTP3.
Enable/Disable Spdy negotiation on per channel basis. The network.http.http2.enabled preference is still a pre-requisite for starting spdy.
Readonly
apiGet value of the URI passed to nsIHttpChannel.redirectTo() if any. May return null when redirectTo() has not been called.
If true, do not use newer protocol features that might have interop problems on the Internet. Intended only for use with critical infra like the updater. default is false.
When set to true, the channel will not pop any authentication prompts up to the user. When provided or cached credentials lead to an authentication failure, that failure will be propagated to the channel listener. Must be called before opening the channel, otherwise throws.
If true, do not resolve any proxy for this request. Intended only for use with critical infra like the updater. default is false.
External handlers may set this to true to notify the channel that it is open on behalf of a download.
Readonly
connectionThe connection info's hash key. We use it to test connection separation.
Set by nsCORSListenerProxy if credentials should be included in cross-origin requests. false indicates "same-origin", users should still check flag LOAD_ANONYMOUS!
Readonly
crossReturns a cached CrossOriginOpenerPolicy that is computed just before we determine if there is a policy mismatch.
NS_ERROR_NOT_AVAILABLE if it has not been computed yet
An http channel can own a reference to the document URI
id of the EarlyHintPreloader to connect back from PreloadService to EarlyHintPreloader.
Readonly
effectiveTRRModeThe effective TRR mode used to resolve this channel. This is computed by taking the value returned by nsIRequest.getTRRMode() and the state of the TRRService. If the domain is excluded from TRR or the TRRService is disabled, the effective mode would be TRR_DISABLED_MODE even if the initial mode set on the request was TRR_ONLY_MODE.
Set to indicate Request.cache mode, which simulates the fetch API semantics, and is also used for exposing this value to the Web page during service worker interception.
This attribute was added before the "flags" above and is retained here for compatibility. When set to true, has the same effect as THIRD_PARTY_FORCE_ALLOW, described above.
Readonly
hasHTTPSRRThis attribute indicates if the HTTPS RR is used for this channel.
If the underlying transport supports RWIN manipulation, this is the intiial window value for the channel. HTTP/2 implements this. 0 means no override from system default. Set before opening channel.
Set to indicate Request.integrity.
Readonly
isReturns true in case this channel is used for auth; (the response header includes 'www-authenticate').
Readonly
isTrue if channel is loaded by socket process.
Set to true if the channel is an OCSP check. Channels with this flag set will skip TRR in mode3 (because the circular dependency with checking OCSP for the TRR server will cause a failure)
Readonly
isThis attribute indicates if the channel was loaded via Proxy.
Readonly
isIf the channel's remote IP was resolved using TRR. Is false for resources loaded from the cache or resources that have an IP literal host.
True if channel is used by the internal trusted recursive resolver This flag places data for the request in a cache segment specific to TRR
Readonly
lastIf this channel was created as the result of a redirect, then this value will reflect the redirect flags passed to the SetupReplacementChannel() method.
Readonly
localThe local IP address to which this channel is bound, in the format produced by PR_NetAddrToString. May be IPv4 or IPv6. Note: in the presence of NAT, this may not be the same as the address that the remote host thinks it's talking to.
May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's endpoints are not yet determined, or in any case when nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
Readonly
localThe local port number to which this channel is bound.
May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's endpoints are not yet determined, or in any case when nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
Readonly
onlyTrue iff the channel is CONNECT only.
Readonly
proxyURIRead the proxy URI, which, if non-null, will be used to resolve proxies for this channel.
Set to indicate Request.redirect mode exposed during ServiceWorker interception. No policy enforcement is performed by the channel for this value.
Readonly
remoteThe IP address of the remote host that this channel is connected to, in the format produced by PR_NetAddrToString.
May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's endpoints are not yet determined, or in any case when nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
Readonly
remoteThe remote port number that this channel is connected to.
May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's endpoints are not yet determined, or in any case when nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
Set by nsCORSListenerProxy to indicate CORS load type. Defaults to CORS_MODE_NO_CORS.
This attribute en/disables the timeout for the first byte of an HTTP response. Enabled by default.
Readonly
supportsHTTP3This attribute indicates if the channel has support for HTTP3
When set, these flags modify the algorithm used to decide whether to send 3rd party cookies for a given channel.
An opaque flags for non-standard behavior of the TLS system. It is unlikely this will need to be set outside of telemetry studies relating to the TLS implementation.
Readonly
topThe URI of the top-level window that's associated with this channel.
Readonly
trrIf the DNS request triggered by this channel didn't use TRR, this value contains the reason why that was skipped.
HTTPUpgrade allows for the use of HTTP to bootstrap another protocol via the RFC 2616 Upgrade request header in conjunction with a 101 level response. The nsIHttpUpgradeListener will have its onTransportAvailable() method invoked if a matching 101 is processed. The arguments to onTransportAvailable provide the new protocol the low level tranport streams that are no longer used by HTTP. If any errors occur during the upgrade but the original request has (potentially) already received onStopRequest, the nsIHttpUpgradeListener will have its onUpgradeFailed() method invoked instead of onTransportAvailable().
The onStartRequest and onStopRequest events are still delivered and the listener gets full control over the socket if and when onTransportAvailable is delivered. Note that if onStopRequest is called with an error, no methods on the nsIHttpUpgradeListener might be invoked at all.
The value of the HTTP Upgrade request header
The callback object used to handle a successful upgrade
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Cancel a channel because we have determined that it needs to be blocked for safe-browsing protection. This is an internal API that is meant to be called by the channel classifier. Please DO NOT use this API if you don't know whether you should be using it.
Called during onStartRequest to compute the cross-origin-opener-policy for a given channel.
Enable only CONNECT to a proxy. Fails if no HTTPUpgrade listener has been defined. An ALPN header is set using the upgrade protocol.
Load flags are set with INHIBIT_CACHING, LOAD_ANONYMOUS, LOAD_BYPASS_CACHE, and LOAD_BYPASS_SERVICE_WORKER.
Proxy resolve flags are set with RESOLVE_PREFER_HTTPS_PROXY and RESOLVE_ALWAYS_TUNNEL.
Generated using TypeDoc
Dumping ground for http. This interface will never be frozen. If you are using any feature exposed by this interface, be aware that this interface will change and you will be broken. You have been warned.