Our great sponsors
-
insomnia
The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
gencurl
gencurl generates a curl command based on an http.Request to be used for logging and debugging
Yeah, this is a really odd choice. I find https://incarnate.github.io/curl-to-php/ (found in the footer) way more interesting since it uses PHP's cURL lib
I use Paw[1] for this, which is obviously a lot more powerful by allowing me to easily toggle and/or modify query params, headers, edit body as structured JSON/XML, etc. Probably doable in other API clients like Insomnia[2], too.
[1] https://paw.cloud/
[2] https://insomnia.rest/
Seems to be mostly doing text-replacement and not actually understand what it's handling and what it can't actually do: https://github.com/icing/blog/blob/main/curl_on_a_weekend.md
All 3 of these are linked to under "Related Tools".
Those projects use a pretty basic tokenizer
https://github.com/luckymarmot/Paw-cURLImporter/blob/master/...
Insomnia and Postman use commander.js for their bash parsing which looks like it just splits on space:
https://github.com/tj/commander.js/blob/02a124c7d58dbae2ef11...
and only support a few of curl's options. Curlconverter uses tree-sitter's Bash grammar https://github.com/tree-sitter/tree-sitter-bash/ and tries to at least correctly discard all of curl's options and any options that curl used to have.
All 3 of these are linked to under "Related Tools".
Those projects use a pretty basic tokenizer
https://github.com/luckymarmot/Paw-cURLImporter/blob/master/...
Insomnia and Postman use commander.js for their bash parsing which looks like it just splits on space:
https://github.com/tj/commander.js/blob/02a124c7d58dbae2ef11...
and only support a few of curl's options. Curlconverter uses tree-sitter's Bash grammar https://github.com/tree-sitter/tree-sitter-bash/ and tries to at least correctly discard all of curl's options and any options that curl used to have.
All 3 of these are linked to under "Related Tools".
Those projects use a pretty basic tokenizer
https://github.com/luckymarmot/Paw-cURLImporter/blob/master/...
Insomnia and Postman use commander.js for their bash parsing which looks like it just splits on space:
https://github.com/tj/commander.js/blob/02a124c7d58dbae2ef11...
and only support a few of curl's options. Curlconverter uses tree-sitter's Bash grammar https://github.com/tree-sitter/tree-sitter-bash/ and tries to at least correctly discard all of curl's options and any options that curl used to have.
Something a bit different but I'm a huge fan of NSwag recently.
https://github.com/RicoSuter/NSwag
We use it on a project at work in C# and I've also been using it personally on pet projects with TypeScript.
Allows you to automatically generate REST API clients based on Swagger/OpenAPI specs and is very customizable.
Really nice if building out microservices and you're wanting to communicate between each other or building web apps and want to communicate with APIs. Saves a lot of time writing code to make requests and handle different status codes etc.
Original author here. Many smart people have contributed code over the years, but one warrants special mention.
About a year ago, verhovsky showed up out of nowhere. He rewrote the core of the application and increased the professionalism across the board. (dedicated domain, github page hosting, UI refresh, privacy improvements, and much more)
The tree-sitter PR is a monster achievement: https://github.com/curlconverter/curlconverter/pull/278
Search for parseAnsiCString in there. I don't think that had ever been implemented in JavaScript before.
For you, verhovsky, 10x engineer might be an understatement. Thank you!
I haven't touched it in years, but I made a utility to do the opposite in Go. Start with Go's request and transform it into a curl call. It was helpful for testing at the time. Looking at it, wow, that was 7 years ago!
https://github.com/sethgrid/gencurl
>I find, only pointfree notation has some beauty to it that makes reading code sweet again.
I haven't written FORTH code in ages, but I still enjoy reading well written FORTH code for its pure literary pleasure!
https://github.com/MitchBradley/openfirmware/blob/master/for...
Related posts
- I absolutely love web scraping.
- The Collaborative API Development Platform – Insomnia
- Convert Curl Commands to Code
- GitHub stars are one of the most inexpensive ways to generate an outsized outcome in the community by leveraging the tailwinds of increased adoption
- Local-only projects are coming back in mid October (Insomnia v8.3)