goog.net.Jsonp
Classgoog.net.Jsonp(uri, opt_callbackParamName)
Creates a new cross domain channel that sends data to the specified host URL. By default, if no reply arrives within 5s, the channel assumes the call failed to complete successfully.
uri
{goog.Uri
|string
}
opt_callbackParamName
{string
=}
.CALLBACKS
The name of the property of goog.global under which the callback is stored.
.cancel(request)
Cancels a given request. The request must be exactly the object returned by the send method.
request
{Object
}
.getRequestTimeout()
Returns the current timeout value, in milliseconds.
number
}
.send(opt_payload, opt_replyCallback, opt_errorCallback,
opt_callbackParamValue)
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.
opt_payload
{Object
=}
opt_replyCallback
{Function
=}
opt_errorCallback
{Function
=}
opt_callbackParamValue
{string
=}
Object
}
.setRequestTimeout(timeout)
Sets the length of time, in milliseconds, this channel is prepared to wait for for a request to complete. If the call is not competed within the set time span, it is assumed to have failed. To wait indefinitely for a request to complete set the timout to a negative number.
timeout
{number
}