Skip to content
⬇️ Convert a curl command into ruby's net/http
JavaScript HTML Ruby CSS
Branch: gh-pages
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Add GitHub Actions workflow for CI Aug 16, 2019
resources
src Upgrade webpack and stuff Nov 11, 2017
.gitignore Convert to webpack May 25, 2016
Gemfile
Gemfile.lock Update Gemfile.lock Aug 16, 2019
LICENSE.txt
README.md Remove travis build status Aug 16, 2019
index.html Add support for -k flag Oct 30, 2016
package.json Update all JS dependencies Aug 16, 2019
test.rb Avoid minitest warning re: assert_nil Nov 11, 2017
webpack.config.js Update all JS dependencies Aug 16, 2019
yarn.lock Update all JS dependencies Aug 16, 2019

README.md

curl-to-ruby

curl-to-ruby is a tool to instantly convert curl commands to ruby code using net/http in the browser. It does not guarantee high-fidelity conversions, but it's good enough for most API docs that have curl samples.

Try it

Check it out! It works inside your browser.

FAQ

Does any curl command work?

Any curl command should work, but only certain flags are understood and converted into ruby code. The rest of the flags will be ignored.

Which kinds of curl commands are understood?

Mostly simple HTTP commands (headers, basic auth, body, etc).

Will you consider supporting this-or-that flag?

curl has like a bajillion options, so don't expect all of them to be implemented; just the most common/important ones to stub out code from API samples and docs, etc. But feel free to open an issue or submit a pull request!

Credits

Updated to ruby by John Hawthorn (jhawthorn)

Based on curl-to-Go by Matt Holt (mholt6).

You can’t perform that action at this time.