神刀安全网

Convert curl commands to ruby's net/http

curl-to-ruby

Instantly convert curl commands to Ruby ‘s net/http

Ruby’s net/http is notorious for not having the friendliest API, but it isn’t all that bad. Ruby has great gems like faraday , but in libraries and small utilities it’s better to kill your dependencies and use what the stdlib provides.

This tool turns a curl command into ruby (2.0+) code using net/http . Currently, it knows the following options: -d / --data , -H / --header , -I / --head , -u / --user , --url , and -X / --request .

There’s probably bugs; please contribute on GitHub . Based oncurl-to-go.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Convert curl commands to ruby's net/http

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址