Commit 19a6cc26 authored by Filipa Lacerda's avatar Filipa Lacerda

Adss changelog entry

parent 32dfa801
...@@ -11,21 +11,21 @@ Vue.use(VueResource); ...@@ -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';
} }
......
---
title: Adds polling utility function for vue resource
merge_request:
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment