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.

Httpie: A cURL alternative

66 pointsby minaandrawosover 7 years ago

11 comments

jimmahoneyover 7 years ago
It looks cool, but I don&#x27;t really want to wait half a minute for it to do anything.<p><pre><code> $ time curl cs.marlboro.college &lt;!DOCTYPE HTML PUBLIC &quot;-&#x2F;&#x2F;IETF&#x2F;&#x2F;DTD HTML 2.0&#x2F;&#x2F;EN&quot;&gt; &lt;html&gt;&lt;head&gt; &lt;title&gt;301 Moved Permanently&lt;&#x2F;title&gt; &lt;&#x2F;head&gt;&lt;body&gt; &lt;h1&gt;Moved Permanently&lt;&#x2F;h1&gt; &lt;p&gt;The document has moved &lt;a href=&quot;https:&#x2F;&#x2F;cs.marlboro.college &#x2F;&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt; &lt;hr&gt; &lt;address&gt;Apache&#x2F;2.4.18 (Ubuntu) Server at cs.marlboro.college Port 80&lt;&#x2F;address&gt; &lt;&#x2F;body&gt;&lt;&#x2F;html&gt; real 0m0.269s user 0m0.004s sys 0m0.005s $ time http cs.marlboro.college HTTP&#x2F;1.1 301 Moved Permanently Connection: Keep-Alive Content-Length: 321 Content-Type: text&#x2F;html; charset=iso-8859-1 Date: Sat, 27 Jan 2018 18:04:17 GMT Keep-Alive: timeout=5, max=100 Location: https:&#x2F;&#x2F;cs.marlboro.college&#x2F; Server: Apache&#x2F;2.4.18 (Ubuntu) &lt;!DOCTYPE HTML PUBLIC &quot;-&#x2F;&#x2F;IETF&#x2F;&#x2F;DTD HTML 2.0&#x2F;&#x2F;EN&quot;&gt; &lt;html&gt;&lt;head&gt; &lt;title&gt;301 Moved Permanently&lt;&#x2F;title&gt; &lt;&#x2F;head&gt;&lt;body&gt; &lt;h1&gt;Moved Permanently&lt;&#x2F;h1&gt; &lt;p&gt;The document has moved &lt;a href=&quot;https:&#x2F;&#x2F;cs.marlboro.college&#x2F;&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt; &lt;hr&gt; &lt;address&gt;Apache&#x2F;2.4.18 (Ubuntu) Server at cs.marlboro.college Port 80&lt;&#x2F;address&gt; &lt;&#x2F;body&gt;&lt;&#x2F;html&gt; real 0m30.553s user 0m0.437s sys 0m0.052s</code></pre>
评论 #16248308 未加载
GhostVIIover 7 years ago
If you like httpie, http-prompt is a good add on for it, it lets you navigate through a rest API as if it is a filesystem (using cd for navigation), and lets you configure the arguments to pass to httpie for future requests.
tyingqover 7 years ago
Depending on what you are doing, Perl&#x27;s LWP::Simple[1] and plain old wget[2] are sometimes handy.<p>[1] <a href="http:&#x2F;&#x2F;www.perlmonks.org&#x2F;?node_id=168684" rel="nofollow">http:&#x2F;&#x2F;www.perlmonks.org&#x2F;?node_id=168684</a><p>[2] <a href="http:&#x2F;&#x2F;www.editcorp.com&#x2F;personal&#x2F;lars_appel&#x2F;wget&#x2F;v1&#x2F;wget_7.html" rel="nofollow">http:&#x2F;&#x2F;www.editcorp.com&#x2F;personal&#x2F;lars_appel&#x2F;wget&#x2F;v1&#x2F;wget_7.h...</a>
nlawalkerover 7 years ago
I&#x27;m just starting to get into Python and using the command line more after a lifetime of mostly sticking to GUIs, and I&#x27;m really digging the &quot;software for humans&quot; vibe I&#x27;m finding in a few places. HTTPie is a good example, as is ncdu, which I just discovered this morning. Also anything by Kenneth Reitz.<p>The command line can be great for commanding, when it&#x27;s done right, but it&#x27;s not so great for most kinds of visualization, so CLI software that recognizes that and tries to compensate really helps.
aorthover 7 years ago
I use httpie to view request and response headers. Very handy when you want to check something without worrying that a browser is caching something for some reason (like a redirect).<p><pre><code> $ http --print Hh http:&#x2F;&#x2F;news.ycombinator.com</code></pre>
ajb257over 7 years ago
HTTPie is awesome, the only thing to watch out for is if you use it for large JSON responses, it can take a while to parse, process and display the response. In that case cURL is still handier, but HTTPie is the tool I generally reach for
ippaover 7 years ago
Love Httpie! Such an awesome cli with easy to remember, natural syntax. When installing on new boxes I wish it wasn&#x27;t depending on python though.
parmesanover 7 years ago
Httpie is my version of Postman and similar services, curl for humans is spot on imho.
jenhsunover 7 years ago
wuzz is nice too. <a href="https:&#x2F;&#x2F;github.com&#x2F;asciimoo&#x2F;wuzz" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;asciimoo&#x2F;wuzz</a>
CardenBover 7 years ago
HTTPie is great! I’ve replaced curl with it in my daily workflow
pimlottcover 7 years ago
Could we all just agree to stop using the adjective “modern”? It’s such a weasal word. If there are advantages to your program, describe them. Simply being “newer” or in the currently trendy style does not make it automatically better.<p>I’m not saying that this is a bad project. But “modern” doesn’t tell me anything about why I might want to use it.
评论 #16246442 未加载
评论 #16247980 未加载
评论 #16247425 未加载