Proxy XMLHttpRequest object
Methods
-
addListener(ename, stat)
-
Setup an {EventListener} for Event @param{ename}. This function will make sure the timestamp for the resources request is set and calls loadFinished should the resource have finished.
See
open()for it's usageParameters:
Name Type Description enameString Eventname to listen on via addEventListener
statString if that
enameis reached set this as the status of the resource -
BOOMR.proxy_XMLHttpRequest(method, url [, async])
-
Open an XMLHttpRequest. If the URL passed as a second argument is in the BOOMR.xhr_exclude list ignore it and move on to request it Otherwise add it to our list of resources to monitor and later beacon on.
If an exception is caught will call loadFinished and set resource.status to
XHR_STATUS_OPEN_EXCEPTIONShould the resource fail to load for any of the following reasons resource.stat status code will be set to:- timeout {Event}
XHR_STATUS_TIMEOUT - error {Event}
XHR_STATUS_ERROR - abort {Event}
XHR_STATUS_ABORT
Parameters:
Name Type Argument Description methodstring HTTP request method
urlstring URL to request on
asyncboolean <optional>
If
truewill setup the EventListeners for XHR events otherwise will set the resource to synchronous. Iftrueorundefinedwill be automatically set to asynchronous - timeout {Event}
-
req.send()
-
Mark requestStart timestamp and start the request unless the resource has already been marked as having an error code or a result to itself.
Returns:
Type: object
The data normal XHR.send() would return