Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make Async Requests to Paginated API

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 151
    Answer it

    I want to make requests to an api that returns a response like so: 

    {
     totalRecords: 30,000,
     data: [{...}],
     links: {
       selfLink: 'http://example-api.com/data?api_key&page=0&size=10',
       nextLink: 'http://example-api.com/data?api_key&page=1&size=10',
     }
    }

    I want to get NextLink and get page=2 until there are no pages left. How do i achieve this using javascript/node?  

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: