An encapsulation of everything needed to make a Xhr request.
NOTE: This is used internal to the XhrManager.
new Request( url, xhrEventCallback, opt_method, opt_content, opt_headers, opt_callback, opt_maxRetries, opt_responseType, opt_withCredentials )
Parameters | url | string | | Uri to make the request too.
| xhrEventCallback | (Function|null) | | Callback attached to the events of the
XhrIo object of the request.
| opt_method | string= | | Send method, default: GET.
| opt_content | (ArrayBuffer|ArrayBufferView|Blob|Document|FormData|string|null)= | | Post data.
| opt_headers | (Object|null)= | | Map of headers to add to the
request.
| opt_callback | (Function|null)= | | Callback function for when request is
complete. NOTE: Only 1 callback supported across all events.
| opt_maxRetries | number= | | The maximum number of times the request
should be retried (Default: 1).
| opt_responseType | goog.net.XhrIo.ResponseType= | | The response type of
this request; defaults to goog.net.XhrIo.ResponseType.DEFAULT.
| opt_withCredentials | boolean= | | Add credentials to this request,
default: false.
|
|
---|