This will reduce the chance that the web server will time out due to no response being sent. In the future, we will be able to use the data for displaying a progress bar in the client.
Even though the GET /update endpoint is not actually part of the public API, we increase the API version to 6.0.1 → 6.1.0, and only use the new output when Accept: text/event-stream header is sent with the request, in order to preserve backwards compatibility.
This is using Server-sent events-style response with three event types:
started, with count data field containing the number of sources that will be updated
sourceUpdated, with finishedCount data field containing the number of sources that will have been updated so far
This will reduce the chance that the web server will time out due to no response being sent. In the future, we will be able to use the data for displaying a progress bar in the client.
Even though the
GET /update
endpoint is not actually part of the public API, we increase the API version to 6.0.1 → 6.1.0, and only use the new output whenAccept: text/event-stream
header is sent with the request, in order to preserve backwards compatibility.This is using Server-sent events-style response with three event types:
started
, withcount
data field containing the number of sources that will be updatedsourceUpdated
, withfinishedCount
data field containing the number of sources that will have been updated so farfinished
https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events
cc @davidoskky @aminecmi This might be useful for RfS as well.