The goog.net.XhrLite Class

.CONTENT_TYPE_HEADER {string}

The Content-Type HTTP header name

.FORM_CONTENT_TYPE {string}

The Content-Type HTTP header value for a url-encoded form

.cleanup

Disposes all non-disposed instances of goog.net.XhrIo created by {@link goog.net.XhrIo.send}. {@link goog.net.XhrIo.send} cleans up the goog.net.XhrIo instance it creates when the request completes or fails. However, if the request never completes, then the goog.net.XhrIo is not disposed. This can occur if the window is unloaded before the request completes. We could have {@link goog.net.XhrIo.send} return the goog.net.XhrIo it creates and make the client of {@link goog.net.XhrIo.send} be responsible for disposing it in this case. However, this makes things significantly more complicated for the client, and the whole point of {@link goog.net.XhrIo.send} is that it's simple and easy to use. Clients of {@link goog.net.XhrIo.send} should call {@link goog.net.XhrIo.cleanup} when doing final cleanup on window unload.

.protectEntryPoints

Installs exception protection for all entry point introduced by goog.net.XhrIo instances which are not protected by {@link goog.debug.ErrorHandler#protectWindowSetTimeout}, {@link goog.debug.ErrorHandler#protectWindowSetInterval}, or {@link goog.events.protectBrowserEventEntryPoint}.

errorHandler {goog.debug.ErrorHandler}
Error handler with which to protect the entry point(s).
opt_tracers {boolean=}
Whether to install tracers around the entry point.

.send

Static send that creates a short lived instance of XhrIo to send the request.

url {string}
Uri to make request too.
opt_callback {Function=}
Callback function for when request is complete.
opt_method {string=}
Send method, default: GET.
opt_content {string=}
Post data.
opt_headers {Object|goog.structs.Map=}
Map of headers to add to the request.
opt_timeoutInterval {number=}
Number of milliseconds after which an incomplete request will be aborted; 0 means no timeout is set.
@see
goog.net.XhrIo.cleanup