fin
fin

Reputation: 1303

How to pass request headers using async node library?

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!

Upvotes: 0

Views: 471

Answers (1)

Andrii Muzalevskyi
Andrii Muzalevskyi

Reputation: 3329

May I advice you use request-promise instead?

Or request if you prefer callback style

Upvotes: 2

Related Questions