I am trying to implement a curl request in node. In curl you can perform the following POST request:
curl -v https://api.sandbox.paypal.com/v1/oauth2/token \
-H "Accept: application/json" \
-H "Accept-Language: en_US" \
-u "client_id:client_secret" \
-d "grant_type=client_credentials"
I understand how to set headers and write the data payload using the node http
module, but how do i implement -u client_id:client_secret
using the http
module?