meteoJS/repetitiveRequests
Source: RepetitiveRequests.
Child class
Abstract type
Class
RepetitiveRequests
Abstract type
options Object
Options for constructor.
Properties
| Name | Type | Optional | Description |
|---|---|---|---|
|
url |
(undefined or string) |
Yes |
URL to make repetitive requests to. If undefined, no request will be done. |
|
user |
string |
Yes |
User to send with request. Defaults to |
|
password |
string |
Yes |
Password to send with request. Defaults to |
|
start |
boolean |
Yes |
Start repetetive requests on construction. Defaults to |
|
defaultTimeout |
(undefined or string) |
Yes |
Default timeout until next request, if response has no Cache-Control HTTP-Header. In milliseconds. If undefined, a further request will only be done, if the reponse returned a valid Cache-Control header. |
|
timeoutOnError |
(undefined or string) |
Yes |
Timeout until next request after a error response. In milliseconds. If undefined, no further request will be done after an error. |
|
pauseOnHiddenDocument |
boolean |
Yes |
Pause making repetitive requests when document is hidden. Defaults to |
|
responseType |
('', 'arraybuffer', 'blob', 'document', 'json', or 'text') |
Yes |
Specifies the content type of the response. See https://developer.mozilla.org/de/docs/Web/API/XMLHttpRequest/responseType. Defaults to |
Events
before:request
Event fired before a request is executed.
error:request
Event fired if a request failed.
Property
| Name | Type | Optional | Description |
|---|---|---|---|
|
request |
|
XMLHttpRequest of the failed request. |
success:request
Event fired on a successful request.
Property
| Name | Type | Optional | Description |
|---|---|---|---|
|
request |
|
XMLHttpRequest of the successful request. |