How to use npm 'request' package for HTTP digest authentication in a POST Request?

276 views Asked by At

I am trying to use the npm request (https://www.npmjs.com/package/request) package to perform a POST request with HTTP Digest Authentication. How could i use the 'request' package to perform HTTP Digest Authentication?

Here is a valid cURL command that works:

curl -X POST -F 'attr1=value1' -F 'file=@./assets/filename' --digest -u 'username:password' 'http://my.api'

How could i achieve this with node.

0

There are 0 answers