{"id":12219,"date":"2019-03-23T15:08:15","date_gmt":"2019-03-23T15:08:15","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12219"},"modified":"2019-03-23T15:08:15","modified_gmt":"2019-03-23T15:08:15","slug":"kurly-an-alternative-to-most-widely-used-curl-program","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/23\/kurly-an-alternative-to-most-widely-used-curl-program\/","title":{"rendered":"Kurly \u2013 An Alternative to Most Widely Used Curl Program"},"content":{"rendered":"<p>Kurly is a free open source, simple but effective, cross-platform alternative to the popular\u00a0<strong>curl<\/strong>\u00a0command-line tool. It is written in\u00a0<a href=\"https:\/\/www.tecmint.com\/install-go-in-linux\/\" target=\"_blank\" rel=\"noopener\">Go programming language<\/a>\u00a0and works in the same way as\u00a0<strong>curl<\/strong>\u00a0but only aims to offer common usage options and procedures, with emphasis on the HTTP(S) operations.<\/p>\n<p>In this tutorial we will learn how to install and use\u00a0<strong>kurly<\/strong>\u00a0program \u2013 an alternative to most widely used curl command in Linux.<\/p>\n<h4>Requirements:<\/h4>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/install-go-in-linux\/\" target=\"_blank\" rel=\"noopener\">GoLang (Go Programming Language) 1.7.4 or higher<\/a>.<\/li>\n<\/ol>\n<h3>How to Install Kurly (Curl Alternative) in Linux<\/h3>\n<p>Once you have installed\u00a0<strong>Golang<\/strong>\u00a0on your Linux machine, you can proceed to install\u00a0<strong>kurly<\/strong>\u00a0by cloning its git repository as shown.<\/p>\n<pre>$ go get github.com\/davidjpeacock\/kurly\r\n<\/pre>\n<p>Alternatively, you can install it via\u00a0<strong>snapd<\/strong>\u00a0\u2013 a package manager for snaps, on a number of Linux distributions. To use\u00a0<strong>snapd<\/strong>, you need to install it on your system as shown.<\/p>\n<pre>$ sudo apt update &amp;&amp; sudo apt install snapd\t[On <strong>Debian\/Ubuntu<\/strong>]\r\n$ sudo dnf update &amp;&amp; sudo dnf install snapd     [On <strong>Fedora 22+<\/strong>]<\/pre>\n<p>Then install\u00a0<strong>kurly<\/strong>\u00a0snap using the following command.<\/p>\n<pre>$ sudo snap install kurly\r\n<\/pre>\n<p>On\u00a0<strong>Arch Linux<\/strong>, you can install from\u00a0<strong>AUR<\/strong>, as follows.<\/p>\n<pre>$ sudo pacaur -S kurly\r\nOR\r\n$ sudo yaourt -S kurly\r\n<\/pre>\n<p>On\u00a0<strong>CentOS\/RHEL<\/strong>, you can download and install its RPM package using package manager as shown.<\/p>\n<pre># wget -c https:\/\/github.com\/davidjpeacock\/kurly\/releases\/download\/v1.2.1\/kurly-1.2.1-0.x86_64.rpm\r\n# yum install kurly-1.2.1-0.x86_64.rpm\r\n<\/pre>\n<h3>How to Use Kurly (Curl Alternative) in Linux<\/h3>\n<p><strong>Kurly<\/strong>\u00a0focuses on the\u00a0<strong>HTTP(S)<\/strong>\u00a0realm, we will use\u00a0<strong>Httpbin<\/strong>, a HTTP request and response service to partly demonstrate how kurly operates.<\/p>\n<p>The following command will return the user agent, as defined in the\u00a0<strong>http:\/\/www.httpbin.org\/user-agent<\/strong>endpoint.<\/p>\n<pre>$ kurly http:\/\/httpbin.org\/user-agent\r\n<\/pre>\n<div id=\"attachment_29149\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Check-User-Agent.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29149\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Check-User-Agent.png\" alt=\"Check User Agent\" width=\"632\" height=\"116\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Check User Agent<\/p>\n<\/div>\n<p>Next, you can use\u00a0<strong>kurly<\/strong>\u00a0to download a file (for example\u00a0<strong>Tomb-2.5.tar.gz<\/strong>\u00a0encryption tool source code), preserving remote filename while saving output using\u00a0<code>-O<\/code>\u00a0flag.<\/p>\n<pre>$ kurly -O https:\/\/files.dyne.org\/tomb\/Tomb-2.5.tar.gz\r\n<\/pre>\n<p>To preserve remote timestamp and follow\u00a0<strong>3xx<\/strong>\u00a0redirects, use the\u00a0<code>-R<\/code>\u00a0and\u00a0<code>-L<\/code>\u00a0flags respectively, as follows.<\/p>\n<pre>$ kurly -R -O -L https:\/\/files.dyne.org\/tomb\/Tomb-2.5.tar.gz\r\n<\/pre>\n<div id=\"attachment_29150\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/download-a-file-using-kurly.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29150\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/download-a-file-using-kurly.png\" sizes=\"auto, (max-width: 822px) 100vw, 822px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/download-a-file-using-kurly.png 822w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/download-a-file-using-kurly-768x73.png 768w\" alt=\"Download File Using Kurly\" width=\"822\" height=\"78\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Download File Using Kurly<\/p>\n<\/div>\n<p>You can set a new name for the downloaded file, using the\u00a0<code>-o<\/code>\u00a0flag as shown.<\/p>\n<pre>$ kurly -R -o tomb.tar.gz -L https:\/\/files.dyne.org\/tomb\/Tomb-2.5.tar.gz  \r\n<\/pre>\n<div id=\"attachment_29151\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Rename-File-While-Downloading.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29151\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Rename-File-While-Downloading.png\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Rename-File-While-Downloading.png 832w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Rename-File-While-Downloading-768x107.png 768w\" alt=\"Rename File While Downloading\" width=\"832\" height=\"116\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Rename File While Downloading<\/p>\n<\/div>\n<p>This example shows how to upload a file, where the\u00a0<code>-T<\/code>\u00a0flag is used to specify the location of a file to upload. Under the\u00a0<strong>http:\/\/httpbin.org\/put<\/strong>\u00a0endpoint, this command will return the\u00a0<strong>PUT<\/strong>\u00a0data as shown in the screenshot.<\/p>\n<pre>$ kurly -T ~\/Pictures\/kali.jpg https:\/\/httpbin.org\/put\r\n<\/pre>\n<div id=\"attachment_29152\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/upload-a-file.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29152\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/upload-a-file.png\" sizes=\"auto, (max-width: 822px) 100vw, 822px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/upload-a-file.png 822w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/upload-a-file-768x233.png 768w\" alt=\"Upload File Using Kurly\" width=\"822\" height=\"249\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Upload File Using Kurly<\/p>\n<\/div>\n<p>To view headers only from a\u00a0<strong>URL<\/strong>\u00a0use the\u00a0<code>-I<\/code>\u00a0or\u00a0<code>--head<\/code>\u00a0flag.<\/p>\n<pre>$ kurly -I https:\/\/google.com\r\n<\/pre>\n<div id=\"attachment_29153\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/get-headers-from-url.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29153\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/get-headers-from-url.png\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/get-headers-from-url.png 802w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/get-headers-from-url-768x257.png 768w\" alt=\"View Website Headers from Terminal\" width=\"802\" height=\"268\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">View Website Headers from Terminal<\/p>\n<\/div>\n<p>To run it quietly, use the\u00a0<code>-s<\/code>\u00a0switch, this way, kurly will not produce any output.<\/p>\n<pre>$ kurly -s -R -O -L https:\/\/files.dyne.org\/tomb\/Tomb-2.5.tar.gz<\/pre>\n<p>Last but not least, you can set the maximum time to wait for an operation to complete in seconds, with the\u00a0<code>-m<\/code>flag.<\/p>\n<pre>$ kurly -s -m 20 -R -O -L https:\/\/files.dyne.org\/tomb\/Tomb-2.5.tar.gz\r\n<\/pre>\n<p>To get a list of all kurly usage flags, consult its command-line help message.<\/p>\n<pre>$ kurly -h\r\n<\/pre>\n<p>For more information visit\u00a0<strong>Kurly Github Repository<\/strong>:\u00a0<a href=\"https:\/\/github.com\/davidjpeacock\/kurly\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/davidjpeacock\/kurly<\/a><\/p>\n<p><strong>Kurly<\/strong>\u00a0is a curl-like tool, but with a few commonly used features under the HTTP(S) realm. Many of the curl-like features are yet to be added to it.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/kurly-alternative-to-linux-curl-command\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kurly is a free open source, simple but effective, cross-platform alternative to the popular\u00a0curl\u00a0command-line tool. It is written in\u00a0Go programming language\u00a0and works in the same way as\u00a0curl\u00a0but only aims to offer common usage options and procedures, with emphasis on the HTTP(S) operations. In this tutorial we will learn how to install and use\u00a0kurly\u00a0program \u2013 an &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/23\/kurly-an-alternative-to-most-widely-used-curl-program\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Kurly \u2013 An Alternative to Most Widely Used Curl Program&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12219","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12219"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12219\/revisions"}],"predecessor-version":[{"id":12220,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12219\/revisions\/12220"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}