{"id":12299,"date":"2019-04-24T23:41:37","date_gmt":"2019-04-24T21:41:37","guid":{"rendered":"https:\/\/daniel.haxx.se\/blog\/?p=12299"},"modified":"2019-04-25T15:27:19","modified_gmt":"2019-04-25T13:27:19","slug":"why-they-use-curl","status":"publish","type":"post","link":"https:\/\/daniel.haxx.se\/blog\/2019\/04\/24\/why-they-use-curl\/","title":{"rendered":"Why they use curl"},"content":{"rendered":"\n<p>As a reader of my blog you know curl. You also most probably already \nknow why you would use curl and if I&#8217;m right, you&#8217;re also a fan of using\n the right tool for the job. But do you know why <em>others<\/em> use \ncurl and why they switch from other solutions to relying on curl for \ntheir current and future data transfers? Let me tell you the top reasons\n I&#8217;m told by users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Logging and exact error handling<\/h2>\n\n\n\n<p>What exactly happened in the transfer and why are terribly important \nquestions to some users, and with curl you have the tools to figure that\n out and also be sure that curl either returns failure or the command \nworked. This clear and binary distinction is important to users for whom\n that single file every transfer is important. For example, some of the \nlargest and most well-known banks in the world use curl in their \nback-ends where each file transfer can mean a transfer of extremely \nlarge sums of money.<\/p>\n\n\n\n<p>A few years ago I helped a money transaction service switch to curl \nto get that exact line in the sand figured out. To know exactly and with\n certainty if money had been transferred &#8211; or not &#8211; for a given \noperation. Vital for their business.<\/p>\n\n\n\n<p>curl does not have the browsers&#8217; lenient approach of &#8220;anything goes \nas long as we get something to show&#8221; when it comes to the Internet \nprotocols.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verbose goodness<\/h2>\n\n\n\n<p>curl&#8217;s <a href=\"https:\/\/ec.haxx.se\/usingcurl-verbose.html\">verbose output options<\/a> allow users to see exactly what curl sends and receives in a quick and non-complicated way. This is invaluable for developers to figure out what&#8217;s happening and what&#8217;s wrong, in either end involved in the data transfer.<\/p>\n\n\n\n<p>curl&#8217;s verbose options allows developers to see all sent and received data even when encryption is used. And if that is not enough, its <a href=\"https:\/\/ec.haxx.se\/tls-sslkeylogfile.html\">SSLKEYLOGFILE support<\/a> allows you to take it to the next level when you need to!<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Same behavior over time<\/h2>\n\n\n\n<p>Users sometimes upgrade their curl installations after several years \nof not having done so. Bumping a software&#8217;s version after several years \nand many releases, any software really, can be a bit of a journey and \nadventure many times as things have changed, behavior is different and \nthings that previously worked no longer do etc.<\/p>\n\n\n\n<p>With curl however, you can upgrade to a version that is a decade \nnewer, with lots of new fancy features and old crummy bugs fixed, only \nto see that everything that used to work back in the day still works &#8211; \nthe same way. With curl, you can be sure that there&#8217;s <strong>an enormous focus on maintaining old functionality<\/strong> when going forward.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Present on all platforms<\/h2>\n\n\n\n<p>The fact that curl is highly portable, our users can have curl and \nuse curl on just about any platform you can think of and use it with the\n same options and behaviors across them all. Learn curl on one platform,\n then continue to use it the same way on the next system. Platforms and \ntheir individual popularity vary over time and we enjoy to allow users \nto pick the ones they like &#8211; and you can be sure that curl will run on \nthem all.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Performance<\/h2>\n\n\n\n<p>When doing the occasional file transfer every once in a while, raw \ntransfer performance doesn&#8217;t matter much. Most of the time will then \njust be waiting on network anyway. You can easily get away with your \nPython and java frameworks&#8217; multiple levels of overhead and excessive \nmemory consumption.<\/p>\n\n\n\n<p>Users who scan the Internet or otherwise perform many thousands of \ntransfers per second from a large number of threads and machines realize\n that they need fewer machines that spend less CPU time if they build \ntheir file transfer solutions on top of curl. In curl we have a focus on\n only doing what&#8217;s required and it&#8217;s a lean and trimmed solution with a \nwell-documented API built purely for Internet data transfers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The features you want<\/h2>\n\n\n\n<p>The author of a banking application recently explained for us that \none of the top reasons why they switched to using curl for doing their \nInternet data transfers, is curl&#8217;s ability to keep the file name from \nthe URL.<\/p>\n\n\n\n<p>curl is a feature-packed tool and library that most likely already \nsupport the protocols you need and provide the power features you want. \nWith a healthy amount of &#8220;extension points&#8221; where you can extend it or \nhook in your custom extra solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Support and documentation<\/h2>\n\n\n\n<p>No other tool or library for internet transfers have even close to \nthe same amount of documentation, examples available on the net, \nexisting user base that can help out and friendly users to support you \nwhen you run into issues. Ask questions on the mailing lists, post a bug\n on the bug tracker or even show your non-working code on stackoverflow \nto further your project.<\/p>\n\n\n\n<p>curl is really the only Internet transfer option available to get  something that&#8217;s old and battle-proven proven by the giants of the  industry, that is trustworthy, high-performing and yet for which <strong>you can also buy commercial support<\/strong> for, today.<\/p>\n\n\n\n<p><em>This blog post was also <a href=\"https:\/\/www.wolfssl.com\/why-they-use-curl\/\">co-posted on wolfssl.com<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a reader of my blog you know curl. You also most probably already know why you would use curl and if I&#8217;m right, you&#8217;re also a fan of using the right tool for the job. But do you know why others use curl and why they switch from other solutions to relying on curl &hellip; <a href=\"https:\/\/daniel.haxx.se\/blog\/2019\/04\/24\/why-they-use-curl\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Why they use curl<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":12314,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[33],"class_list":["post-12299","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-curl","tag-curl-and-libcurl"],"_links":{"self":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/12299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/comments?post=12299"}],"version-history":[{"count":14,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/12299\/revisions"}],"predecessor-version":[{"id":12319,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/12299\/revisions\/12319"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media\/12314"}],"wp:attachment":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media?parent=12299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/categories?post=12299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/tags?post=12299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}