I am writing a Node.js API to register a user to another web app. The problem is, during registration process, the API that the Node app requested with request
is 301
redirected to another API to complete the registration.
This problem can be solved if I'm using jQuery AJAX and wait for the .complete()
callback to make sure the redirection is successful.
How can I accomplish this with Node.js request
?