How to execute curl operation using request module with authorizaion: bearer token?

266 Views Asked by At

I am using Cloud Foundry for Bluemix app creation in that curl operations having Authorization:bearer xxxxx token.
How can I include Authorization: bearer token in request module?

1

There are 1 best solutions below

0
On

The plain open source Clound Foundry client is able to curl the api like this:

$ cf curl -X GET https://.../v2/...

for instance:

$ cf curl -X GET /v2/apps