Sends the given payload to the URL specified at the construction
time. The reply is delivered to the given replyCallback. If the
errorCallback is specified and the reply does not arrive within the
timeout period set on this channel, the errorCallback is invoked
with the original payload.
If no reply callback is specified, then the response is expected to
consist of calls to globally registered functions. No &callback=
URL parameter will be sent in the request, and the script element
will be cleaned up after the timeout.
Parameters | opt_payload | (Object|null)= | | Name-value pairs. If given, these will be
added as parameters to the supplied URI as GET parameters to the
given server URI.
| opt_replyCallback | (Function|null)= | | A function expecting one
argument, called when the reply arrives, with the response data.
| opt_errorCallback | (Function|null)= | | A function expecting one
argument, called on timeout, with the payload (if given), otherwise
null.
| opt_callbackParamValue | string= | | Value to be used as the
parameter value for the callback parameter (callbackParamName).
To be used when the value needs to be fixed by the client for a
particular request, to make use of the cached responses for the request.
NOTE: If multiple requests are made with the same
opt_callbackParamValue, only the last call will work whenever the
response comes back.
|
|
---|
Returns | Object | A request descriptor that may be used to cancel this
transmission, or null, if the message may not be cancelled.
|
|
---|