jiangmiao / node-curl

node curl wrapper with fully implemented
https://npmjs.org/package/node-curl
MIT License
184 stars 28 forks source link

http PATCH and json Data #51

Open celevra opened 8 years ago

celevra commented 8 years ago

Hi,

i'm not exactly sure how i can use the http patch method and transfer json data? I want an equivalent for

curl -X PATCH --data '{"rrsets": [ {"name": "test.example.net.", "type": "A", "ttl": 3600, "changetype": "REPLACE", "records": [ {"content": "127.0.0.1", "disabled": false} ] } ] }' -H 'X-API-Key: xxx' http://127.0.0.1:8081/api/v1/servers/localhost/zones/example.net.

setting the Header is no problem, but where can i set the request type and the data?

thanks for your help

regards

celevra