zl程序教程

您现在的位置是:首页 >  其它

当前栏目

curl 转 wget

CURL wget
2023-09-11 14:17:02 时间

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 .