Adss changelog entry
This commit is contained in:
parent
32dfa80108
commit
19a6cc2664
|
@ -11,21 +11,21 @@ Vue.use(VueResource);
|
||||||
* new poll({
|
* new poll({
|
||||||
* url: 'endopoint',
|
* url: 'endopoint',
|
||||||
* data: {},
|
* data: {},
|
||||||
* successCallback: () => {}
|
* successCallback: () => {},
|
||||||
* errorCallback: () => {}
|
* errorCallback: () => {},
|
||||||
* }).makeRequest();
|
* }).makeRequest();
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* 1. Checks for response and headers before start polling
|
* 1. Checks for response and headers before start polling
|
||||||
* 2. Interval is provided by `X-Poll-Interval` header.
|
* 2. Interval is provided by `Poll-Interval` header.
|
||||||
* 3. If `X-Poll-Interval` is -1, we stop polling
|
* 3. If `Poll-Interval` is -1, we stop polling
|
||||||
* 4. If HTTP response is 200, we poll.
|
* 4. If HTTP response is 200, we poll.
|
||||||
* 5. If HTTP response is different from 200, we stop polling.
|
* 5. If HTTP response is different from 200, we stop polling.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export default class poll {
|
export default class poll {
|
||||||
constructor(options) {
|
constructor(options = {}) {
|
||||||
this.options = options || {};
|
this.options = options;
|
||||||
|
|
||||||
this.intervalHeader = 'POLL-INTERVAL';
|
this.intervalHeader = 'POLL-INTERVAL';
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Adds polling utility function for vue resource
|
||||||
|
merge_request:
|
||||||
|
author:
|
Loading…
Reference in New Issue