我知道您可以使用 -H 标头在 cURL 中设置原点,如下所示:
curl -H "Origin: http://foo.bar.com" --verbose \
https://example.com
有没有node-libcurl
办法设置 -H 标头?这是我当前的获取请求:
const { curly } = require('node-libcurl')
async function test(){
mm = await curly.get('https://example.com')
console.log(mm)
}
test()