JCMais / node-libcurl

libcurl bindings for Node.js
https://npmjs.org/package/node-libcurl
MIT License
660 stars 117 forks source link

How can I write a custom request asynchronously? #388

Closed jason-liu22 closed 7 months ago

jason-liu22 commented 1 year ago

I know we can send a custom request like following. curl.setOpt(Curl.option.CUSTOMREQUEST, method); But I want to write it asynchronously(Promise), not an on event based. How can I do it?

JCMais commented 7 months ago

use await curly(url, { customRequest: 'SOMETHING' })