Poll with vue resource get function
What does this MR do?
Creates a reusable class so we can poll and update data real time. Implements the following:
- Interval is provided by
Poll-Interval
header. - If HTTP response is 200, we poll.
- If
Poll-Interval
is -1, we stop polling - If HTTP response is different from 200, we stop polling.
Usage:
new poll({
resource: {},
method: 'get',
data: {},
successCallback: () => {},
errorCallback: () => {},
}).makeRequest();
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated [ ] API support added- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #29575 (closed)