Skip to content

Poll with vue resource get function

Filipa Lacerda requested to merge 29575-polling into master

What does this MR do?

Creates a reusable class so we can poll and update data real time. Implements the following:

  1. Interval is provided by Poll-Interval header.
  2. If HTTP response is 200, we poll.
  3. If Poll-Interval is -1, we stop polling
  4. 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?

What are the relevant issue numbers?

Closes #29575 (closed)

Merge request reports