M
M
Mdmitr2020-10-12 13:33:34
RESTful API
Mdmitr, 2020-10-12 13:33:34

Is it possible to get data from Api without waiting for full download?

There must be only one request to the network.

The data should be displayed as it loads.

fetch('https://jsonplaceholder.typicode.com/todos')
   .then(response => response.json())
   .then(json => console.log(json))

One fetch request and receiving data in parts, so as not to wait for the entire json to be loaded.

Can this be done at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2020-10-12
@Mdmitr

If I understand correctly, then you need pagination. Give data from the backend page by page and display accordingly on the front, with the ability to go to the desired page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question