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 .

posted @ 2019-08-19 09:56  程序媛李李李李蕾  阅读(942)  评论(0编辑  收藏  举报