M
M
Michail2018-07-29 02:20:36
Node.js
Michail, 2018-07-29 02:20:36

How to replace the link in http.get with the one that came from the server in a loop?

There is an api that returns a link. After the answer is returned, you need to do a get on the new link and so many times, that is, you need a cycle.
While it turned out to be done through an interval and recursion, but this is not entirely correct.
I didn’t understand promises, is it possible to do this without them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gleip, 2018-07-29
@3ongleip

It won't work without promises. With promises, this task is easily solved. I can answer more specifically if you write the code that you now have

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question