curl 转 wget
作者:互联网
curl 转 wget
// sed -e 's@-H @--header=@g;s@^curl @wget @g;s@--compressed$@@g' $crf
var curlStr = `curl 'https://www.baidu.com/favicon.ico' -H 'Pragma: no-cache' --compressed`
var wgetStr = curlStr
.replace(/-H/g, '--header')
.replace(/^curl/, 'wget')
.replace(/--compressed$/, '')
console.log(wgetStr)
以上仅简单的转换了 header .
标签:replace,header,compressed,wget,curl,wgetStr 来源: https://www.cnblogs.com/daysme/p/11375445.html