curl turn wget

curl turn 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)

These are only a simple conversion of the header.

Guess you like

Origin www.cnblogs.com/daysme/p/11375445.html
Recommended