TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Online curl command line builder

96 pointsby tuxoneabout 10 years ago

19 comments

laumarsabout 10 years ago
While I appreciate the idea and the work that&#x27;s gone into this site, sadly it seems too basic to be of much use. It only supports half a dozen flags - all of which are easy to use normally anyway. It&#x27;s missing user agent, headers, cookies, etc. The latter two being items that could be particularly tricky for the &quot;curl novice&quot;.<p>Instead I&#x27;d probably recommend people use Chrome&#x2F;Chromium&#x27;s developer tools which can export HTTP requests as curl commands: <a href="https:&#x2F;&#x2F;coderwall.com&#x2F;p&#x2F;-fdgoq&#x2F;chrome-developer-tools-adds-copy-as-curl" rel="nofollow">https:&#x2F;&#x2F;coderwall.com&#x2F;p&#x2F;-fdgoq&#x2F;chrome-developer-tools-adds-c...</a>
评论 #9428752 未加载
评论 #9428256 未加载
joemccall86about 10 years ago
Seems pretty helpful, though for most of my endpoint testing I&#x27;ve switched to httpie[1], and my teammates have followed. The only exception is when I need to load-test a service real quick, and curl can make requests much faster than httpie.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;jakubroztocil&#x2F;httpie" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jakubroztocil&#x2F;httpie</a>
评论 #9427774 未加载
kstrauserabout 10 years ago
I&#x27;m a huge fan of &quot;Paw&quot; for OS X (<a href="https:&#x2F;&#x2F;luckymarmot.com&#x2F;paw" rel="nofollow">https:&#x2F;&#x2F;luckymarmot.com&#x2F;paw</a>). After you construct your query, it generates the equivalent code for curl, Objective-C (NSURLConnection or AFNetworking), Python, jQuery, or several others. It also now integrates with Mashape so you can download preconstructed libraries of API calls.<p>Disclaimer: I have no connection with Paw&#x27;s developers - I&#x27;m just a very happy user.
评论 #9429120 未加载
评论 #9428174 未加载
评论 #9428559 未加载
sleepyheadabout 10 years ago
Or use <a href="https:&#x2F;&#x2F;github.com&#x2F;jakubroztocil&#x2F;httpie" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jakubroztocil&#x2F;httpie</a>
评论 #9426146 未加载
vogabout 10 years ago
Nice idea, but this tool doesn&#x27;t escape URLs properly. The biggest problem are &quot;&amp;&quot; characters, but also &quot;?&quot; characters make trouble in some shells (e.g. zsh).
评论 #9426259 未加载
pkulakabout 10 years ago
I&#x27;m a big fan of right clicking on the request in the Chrome developer console and selecting &quot;Copy as cURL&quot;. Obviously only works if you&#x27;re doing browser stuff, but super helpful nonetheless.
评论 #9428850 未加载
mrfusionabout 10 years ago
I&#x27;d love to see things like this built for lots of complex command line tools. I think awk would be really useful.
评论 #9426538 未加载
VeejayRampayabout 10 years ago
Just for the info, Chrome (and possibly other browsers as well) allows to build cURL commands from any network calls with a right-click on a HTTP call in the Network tab.
fideloperabout 10 years ago
What I really want is for requestb.in (and friends) to generate a cURL CLI command for me, just like Chrome developer tools does.<p>This would be useful for things like grabbing a test Stripe webhook sent to requestb.in and sending it to your local dev server.<p>(I think there are some things you can host yourself to capture and replay HTTP requests, however - I can&#x27;t remember what they are)
评论 #9427545 未加载
rafaquequeabout 10 years ago
Good idea. It&#x27;s quite difficult to remember all those parameters and command structure. Thanks, bookmarked.
评论 #9431998 未加载
5habout 10 years ago
Good timing, I was just after something to like this to include in some API docs i&#x27;m handing over.
johnsabout 10 years ago
This is really cool. You could tie the output to one of my projects: embedcurl.com<p>This also makes me want to go back and add Copy as curl to hurl.it.
ecaronabout 10 years ago
@tuxone - Any chance of opening this up to accept PRs for adding new exposure to curl features (like adding headers)?
euphemizeabout 10 years ago
Cool, gimme a field to add a custom header (e.g. &quot;Authorization&quot; is pretty common) and I&#x27;ll use it!
评论 #9426648 未加载
评论 #9427796 未加载
ameliusabout 10 years ago
Doesn&#x27;t work with tcsh.<p>Does anybody know how to escape curly braces on tcsh?
Gonzihabout 10 years ago
why not just man curl?
评论 #9428265 未加载
niixabout 10 years ago
Nice, this is really helpful.
_mikzabout 10 years ago
what is so hard about remembering how to use curl?<p>I was hoping for some JS library that would generate the commands with proper escaping etc.
评论 #9426230 未加载
ripkirbyabout 10 years ago
Read the man pages