Giter Club home page Giter Club logo

curl-to-go's Introduction

curl-to-Go

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

This is a sister tool to JSON-to-Go, which converts JSON to a Go struct type definition. To do the reverse, check out moul/http2curl.

Try it

Check it out! It works inside your browser. Just give the code a once-over since it will need you to flesh out some parts like error handling.

FAQ

Does any curl command work?

Any curl command should work, but only certain flags are understood and converted into Go 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! To request a new flag, please provide the equivalent Go code.

Credits

curl-to-Go is brought to you by Matt Holt (mholt6). Enjoy!

curl-to-go's People

Contributors

mholt avatar verhovsky avatar abdullah2993 avatar git001 avatar alexchao26 avatar arjunmahishi avatar bengadbois avatar chrsblck avatar 0x49b avatar ishanjain28 avatar moul avatar thaiphan avatar bakert avatar zmackie avatar 0x333333 avatar two avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.