'using Node 16's https request() method, how do I add additional non-header flags?
I'm trying to use the https package's request method, and for the api call I want to make, I need to do the equivalent of:
curl --location --request GET 'https://api.example.com \ --header 'Content-Type: application/json' \ --data-raw '{"uid":"<UID>", "from":"2021-05-01 00-00-00", "until":"2021-06-01 00-00-00"}'
I know how to add headers into the request and send them, but I'm confused about the --location and the --data-raw. How do I deal with those?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
