goog.labs.net.webChannel.ChannelRequest |
channel
: goog.labs.net.webChannel.Channel
The channel that owns this request.
|
channelDebug
: goog.labs.net.webChannel.WebChannelDebug
A
WebChannelDebug to use for logging.
|
opt_sessionId
: string=
The session id for the channel.
|
opt_requestId
: string | number=
The request id for this request.
|
opt_retryId
: number=
The retry id for this request.
|
![]()
Cancels the request no matter what the underlying transport is.
|
code » | ||||||
![]()
Called when the browser declares itself offline at the start of a request or
during its lifetime. Abandons that request.
|
code » | ||||||
![]()
Cancels the watchdog timer if it has been started.
|
code » | ||||||
![]()
Cleans up the objects used to make the request. This function is
idempotent.
|
code » | ||||||
![]()
Decodes the next set of available chunks in the response.
|
code » | ||||||
![]()
Notifies the channel that this request failed.
|
code » | ||||||
![]()
Ensures that there is watchdog timeout which is used to ensure that
the connection completes in time.
|
code » | ||||||
![]()
If the request was not successful, returns the reason.
Returns: ?ChannelRequest.Error
The last error.
|
code » | ||||||
Returns the status code of the last request.
Returns: number
The status code of the last request.
|
code » | ||||||
Returns the next chunk of a chunk-encoded response. This is not standard
HTTP chunked encoding because browsers don't expose the chunk boundaries to
the application through XMLHTTP. So we have an additional chunk encoding at
the application level that lets us tell where the beginning and end of
individual responses are so that we can only try to eval a complete JS array.
The encoding is the size of the chunk encoded as a decimal string followed
by a newline followed by the data.
|
code » | ||||||
Returns the data for a post, if this request is a post.
Returns: ?string
The POST data provided by the request initiator.
|
code » | ||||||
Returns the request id for this request. Each request has a unique request
id and the request IDs are a sequential increasing count.
|
code » | ||||||
Returns the time that the request started, if it has started.
Returns: ?number
The time the request started, as returned by goog.now().
|
code » | ||||||
Returns the session id for this channel.
|
code » | ||||||
Indicates whether the request was successful. Only valid after the handler
is called to indicate completion of the request.
Returns: boolean
True if the request succeeded.
|
code » | ||||||
Returns the XhrIo request object.
Returns: ?goog.net.XhrIo
Any XhrIo request created for this object.
|
code » | ||||||
![]()
Called when the request has actually timed out. Will cleanup and notify the
channel of the failure.
|
code » | ||||||
![]()
Starts the IMG request.
|
code » | ||||||
![]()
Callback from the Trident htmlfile ActiveX control for when the request
is complete
Arguments:
|
code » | ||||||
![]()
Callback from the Trident htmlfile ActiveX control for when the request
is complete
Arguments:
|
code » | ||||||
![]()
Callback from the Trident htmlfile ActiveX control for when a new message
is received.
Arguments:
|
code » | ||||||
![]()
Callback from the Trident htmlfile ActiveX control for when a new message
is received.
Arguments:
|
code » | ||||||
![]()
Called when the watchdog timer is triggered. It also handles a case where it
is called too early which we suspect may be happening sometimes
(not sure why)
|
code » | ||||||
![]()
Called by the readystate handler for XMLHTTP requests.
|
code » | ||||||
![]()
Polls the response for new data.
|
code » | ||||||
![]()
Handles a readystatechange event.
Arguments:
|
code » | ||||||
![]()
Helper to call the callback's onRequestData, which catches any
exception and cleans up the request.
Arguments:
|
code » | ||||||
![]()
Uses an IMG tag to send an HTTP get to the server. This is only currently
used to terminate the connection, as an IMG tag is the most reliable way to
send something to the server while the page is getting torn down.
Arguments:
|
code » | ||||||
![]()
Sends a request via XMLHTTP according to the current state of the request
object.
Arguments:
|
code » | ||||||
![]()
Sets extra HTTP headers to add to all the requests sent to the server.
Arguments:
|
code » | ||||||
![]()
Sets the throttle for handling onreadystatechange events for the request.
Arguments:
|
code » | ||||||
![]()
Sets the timeout for a request
Arguments:
|
code » | ||||||
![]()
Starts a polling interval for changes to responseText of the
XMLHttpRequest, for browsers that don't fire onreadystatechange
as data comes in incrementally. This timer is disabled in
cleanup_().
|
code » | ||||||
![]()
Starts the watchdog timer which is used to ensure that the connection
completes in time.
Arguments:
|
code » | ||||||
![]()
Uses the Trident htmlfile ActiveX control to send a GET request in IE. This
is the innovation discovered that lets us get intermediate results in
Internet Explorer. Thanks to http://go/kev
|
code » | ||||||
![]()
Starts the Trident request.
Arguments:
|
code » | ||||||
![]()
Uses XMLHTTP to send an HTTP GET to the server.
Arguments:
|
code » | ||||||
![]()
XmlHttp handler
Arguments:
|
code » | ||||||
![]()
Uses XMLHTTP to send an HTTP POST to the server.
|
code » |
The base Uri for the request. The includes all the parameters except the
one that indicates the retry number.
|
Code » | |
![]()
Whether the request has been cancelled due to a call to cancel.
|
Code » | |
The channel debug to use for logging
|
Code » | |
The channel object that owns the request.
|
Code » | |
![]()
Whether to the result is expected to be encoded for chunking and thus
requires decoding.
|
Code » | |
An object to keep track of the channel request event listeners.
|
Code » | |
![]()
Extra HTTP headers to add to all the requests sent to the server.
|
Code » | |
![]()
The last error if the request failed.
|
Code » | |
![]()
The last status code received.
|
Code » | |
A timer for polling responseText in browsers that don't fire
onreadystatechange during incremental loading of responseText.
|
Code » | |
![]()
The post data, if the request is a post.
|
Code » | |
![]()
A throttle time in ms for readystatechange events for the backchannel.
Useful for throttling when ready state is INTERACTIVE (partial data).
If set to zero no throttle is used.
See WebChannelBase.prototype.readyStateChangeThrottleMs_
|
Code » | |
The throttle for readystatechange events for the current request, or null
if there is none.
|
Code » | |
![]()
The time the request started.
|
Code » | |
The request Uri that was actually used for the most recent request attempt.
|
Code » | |
![]()
The attempt number of the current request.
|
Code » | |
![]()
The RID (request ID) for the request.
|
Code » | |
![]()
Whether to send the Connection:close header as part of the request.
|
Code » | |
![]()
The Session ID for the channel.
|
Code » | |
![]()
Whether the request was successful. This is only set to true after the
request successfully completes.
|
Code » | |
![]()
The timeout in ms before failing the request.
|
Code » | |
![]()
The Trident instance if the request is using Trident.
|
Code » | |
![]()
The type of request (XMLHTTP, IMG, Trident)
|
Code » | |
![]()
The verb (Get or Post) for the request.
|
Code » | |
![]()
The time in the future when the request will timeout.
|
Code » | |
![]()
The TimerID of the timer used to detect if the request has timed-out.
|
Code » | |
![]()
The position of where the next unprocessed chunk starts in the response
text.
|
Code » | |
The XhrLte request if the request is using XMLHTTP
|
Code » |
![]()
Convenience factory method.
Arguments:
Returns: !ChannelRequest
The created channel request.
|
code » | ||||||
Returns a useful error string for debugging based on the specified error
code.
|
code » | ||||||
Returns whether XHR streaming is supported on this browser.
If XHR streaming is not supported, we will try to use an ActiveXObject
to create a Forever IFrame.
Returns: boolean
Whether XHR streaming is supported.
|
code » |
![]()
Sentinel value used to indicate an incomplete chunk in a multi-chunk
response.
|
Code » | |
![]()
Sentinel value used to indicate an invalid chunk in a multi-chunk response.
|
Code » | |
![]()
How often to poll (in MS) for changes to responseText in browsers that don't
fire onreadystatechange during incremental loading of responseText.
|
Code » | |
![]()
Default timeout in MS for a request. The server must return data within this
time limit for the request to not timeout.
|
Code » |
![]()
Enum type for identifying an error.
Constants:
|
Code » | |||||||||
![]()
Enum for channel requests type
Constants:
|
Code » |