How to pass request headers using async node library?

432 Views Asked by At

I’m using the async-get-json library to call a REST API. I’m unclear as to the parameter structure of the request structure and unfortunately there is no readme or docs available for the lib.

I’d like help passing an array of request headers to the getJson(...) function?

There is a runkit example at the top of this page that you can fiddle with!

1

There are 1 best solutions below

0
Andrii Muzalevskyi On BEST ANSWER

May I advice you use request-promise instead?

Or request if you prefer callback style