I have to create an api in node js i am creating it into curl how can i convert the cURL Request into node js. how can i pass url,header and data binary in node js? The follwing is the cURL Request?
curl -v "https://us-extract.api.smartystreets.com/?auth-id=AUTH_ID&auth-token=AUTH_TOKEN" -H "content-type: application/json" --data-binary ""
There are some very handy tools for this, check out https://curl.trillworks.com/#node, it will convert curl requests to code in Node.js, Python, Go etc.
I've changed your curl request slightly to:
(Note I've redacted your auth-id and auth-token, we don't other people to use these.. :-))
In your example the output will be like as below, note this uses the request library. You'll have to do an npm install request to add this to your project.