4 ms·
I love curl so much. I just learned that you can 'copy to curl command' from the chrome inspector's network panel by right clicking on any request!! I want to
by escherize 12y ago
I love curl so much. I just learned that you can 'copy to curl command' from the chrome inspector's network panel by right clicking on any request!!
I want to make a library that reads the curl command (and maybe request syntax?) and outputs a function that will do that command.
- anonfunction 12y agoWe just built something[1] similar, but it uses the HAR request object to describe the request. [1] https://github.com/Mashape/httpsnippet https://github.com/Mashape/httpsnippet
- bagder 12y agocurl has a --libcurl option which you can add to a curl command line, and then it'll generate a libcurl-using C code template for that same operation...
- 72deluxe 12y agoThat's incredibly useful, never knew that. Thanks!
- artpar 12y agohttps://shibukawa.github.io/curl_as_dsl/ https://shibukawa.github.io/curl_as_dsl/
- sorokod 12y agoThat is very nice!
- DenisM 12y agoSo many languages supported, but no plain C?
- tlrobinson 12y agoAs someone else mentioned, this is actually built into Curl with the "--libcurl file.c" option.
- TazeTSchnitzel 12y agoOf course for PHP, you can also just use the curl bindings ;)
- escherize 12y agoWow! Thank you, what a great project!
- jamessb 12y agoSimilarly you can right-click and "Copy as cURL" from the Network pane of Firefox's web developer tools.
- awalGarg 12y agoYou can also edit requests and resend them from the FF dev tools. Alas, you can't (yet) do that from the Chrome dev tools.
- organsnyder 12y agoWow—that's incredibly useful. I didn't know about it either. Thanks for the tip!