{"id":1529,"date":"2016-07-04T17:00:20","date_gmt":"2016-07-04T14:00:20","guid":{"rendered":"http:\/\/www.systemcodegeeks.com\/?p=1529"},"modified":"2017-12-04T15:56:43","modified_gmt":"2017-12-04T13:56:43","slug":"linux-curl-example","status":"publish","type":"post","link":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/","title":{"rendered":"Linux curl Example"},"content":{"rendered":"<p>cURL is an incredibly flexible and powerful tool data transferring tool, that supports a wide variety of protocols, being the HTTP (and HTTPS) the most used. cURL library is available for many programming languages, but in this example we will see how to use it from the command line.<\/p>\n<p>For this tutorial, Mint 17.3 has been used.<\/p>\n<h2>1. Installation<\/h2>\n<p>cURL can be installed easily via <code>apt-get<\/code>:<\/p>\n<pre class=\"brush:bash\">sudo apt-get update\r\nsudo apt-get install curl<\/pre>\n<p>[ulp id=&#8217;SG9vnnKgRCD7iZxf&#8217;]<\/p>\n<h2>2. Basic usage<\/h2>\n<p>The simplest way to use cURL is just executing it, and specifying a site:<\/p>\n<pre class=\"brush:bash\">curl &lt;site&gt;<\/pre>\n<p>For example<\/p>\n<pre class=\"brush:bash\">curl google.com<\/pre>\n<p>And the terminal would show:<\/p>\n<pre class=\"brush:html\">&lt;HTML&gt;\r\n&lt;HEAD&gt;\r\n    &lt;meta http-equiv=\"content-type\" content=\"text\/html;charset=utf-8\"&gt;\r\n    &lt;TITLE&gt;301 Moved&lt;\/TITLE&gt;\r\n&lt;\/HEAD&gt;\r\n&lt;BODY&gt;\r\n    &lt;H1&gt;301 Moved&lt;\/H1&gt;\r\n    The document has moved\r\n    &lt;A HREF=\"http:\/\/www.google.es\/\"&gt;here&lt;\/A&gt;.\r\n&lt;\/BODY&gt;\r\n&lt;\/HTML&gt;<\/pre>\n<p>Which is not what we were expecting. This is because, <strong>by default, cURL doesn&#8217;t follow 3XX redirections<\/strong>. To make cURL follow redirections, we have to pass the <code>-L<\/code> option:<\/p>\n<pre class=\"brush:bash\">curl -L google.com<\/pre>\n<p>To save the HTTP response returned by cURL, we can always make a shell redirect with <code>&gt;<\/code>, or use the <code>-o<\/code> option:<\/p>\n<pre class=\"brush:bash\">curl -o google.html -L google.com<\/pre>\n<p>When used, data about the receiving response is shown:<\/p>\n<pre class=\"brush:bash\">\u00a0 % Total\u00a0\u00a0\u00a0 % Received % Xferd\u00a0 Average Speed\u00a0\u00a0 Time\u00a0\u00a0\u00a0 Time\u00a0\u00a0\u00a0\u00a0 Time\u00a0 Current\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dload\u00a0 Upload\u00a0\u00a0 Total\u00a0\u00a0 Spent\u00a0\u00a0\u00a0 Left\u00a0 Speed\r\n100\u00a0\u00a0 219\u00a0 100\u00a0\u00a0 219\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0 2259\u00a0\u00a0\u00a0\u00a0\u00a0 0 --:--:-- --:--:-- --:--:--\u00a0 2281\r\n\u00a0 0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 0 11675\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0\u00a0 50630\u00a0\u00a0\u00a0\u00a0\u00a0 0 --:--:-- --:--:-- --:--:-- 10.5M<\/pre>\n<p>To see more information, including the HTTP headers, we have available the <code>-v<\/code> (<code>--verbose<\/code>) option:<\/p>\n<pre class=\"brush:bash\">curl -v google.com<\/pre>\n<p>Which will show something similar to the following before the HTTP response:<\/p>\n<pre class=\"brush:bash\">* Rebuilt URL to: google.com\/\r\n* Hostname was NOT found in DNS cache\r\n*\u00a0\u00a0 Trying 130.206.193.53...\r\n* Connected to google.com (130.206.193.53) port 80 (#0)\r\n&gt; GET \/ HTTP\/1.1\r\n&gt; User-Agent: curl\/7.35.0\r\n&gt; Host: google.com\r\n&gt; Accept: *\/*\r\n&gt;\r\n&lt; HTTP\/1.1 302 Found\r\n&lt; Cache-Control: private\r\n&lt; Content-Type: text\/html; charset=UTF-8\r\n&lt; Location: http:\/\/www.google.es\/?gfe_rd=cr&amp;ei=OulzV836N9Op8weYzoxY\r\n&lt; Content-Length: 256\r\n&lt; Date: Wed, 29 Jun 2016 15:28:58 GMT\r\n&lt;\r\n# HTML<\/pre>\n<h2>3. Requests<\/h2>\n<h3>3.1. GET<\/h3>\n<p>Making GET request with cURL is so simple. Actually, is as same as making it in the browser. For example:<\/p>\n<pre class=\"brush:bash\">curl -o systemcodegeeks.html https:\/\/www.systemcodegeeks.com?s=linux<\/pre>\n<p>We just have to add the query string in <code>field=value&amp;<\/code> format after <code>?<\/code>.<\/p>\n<h3>3.2. POST<\/h3>\n<p>To make a POST request, the usage is slightly different. The syntax is the following:<\/p>\n<pre class=\"brush:bash\">curl -d \"field1=value1&amp;field2=value2&amp;fieldN=valueN\" &lt;site&gt;<\/pre>\n<p>So, for making a search as the one done above, but supposing that the form method is POST, would be:<\/p>\n<pre class=\"brush:bash\">curl -d \"s=linux\" systemcodegeeks.com -o systemcodegeeks.html<\/pre>\n<p>Of course, we can make a POST request for uploading files:<\/p>\n<pre class=\"brush:bash\">curl -F \"field=@\/path\/to\/file.txt\" awebsite.com\/uploadfile<\/pre>\n<p>In this case, we have to specify the <code>-F<\/code> option for the file. And, the leading <code>@<\/code> before the path to the file is necessary.<\/p>\n<p>For making a POST request that combines both files and <em>normal<\/em> data, the data has to bet set also with <code>-F<\/code>, and not with <code>-d<\/code>. This is because the forms for file uploads sets the data encoding to <code>-multipart\/form-data<\/code>, and this is what <code>-F<\/code> option does; whereas <code>-d<\/code> option sets the encoding to\u00a0<code>application\/x-www-form-urlencoded<\/code>. And all the data in a form has to be encoded under the same encoding. So, we have to specify also the data with <code>-F<\/code> option:<\/p>\n<pre class=\"brush:bash\">curl -F \"field=value\" -F \"file=@\/path\/to\/file.txt\" awebsite.com\/uploadfile<\/pre>\n<h3>3.3. Custom requests: PUT and DELETE<\/h3>\n<p>PUT and DELETE are considered <code>custom-methods<\/code>. These requests are mostly used in CRUDs (Create, Read, Update, Delete), in RESTful services. To specify these commands, we have to use <code>-X<\/code> option.<\/p>\n<p>For example:<\/p>\n<pre class=\"brush:bash\">curl -X PUT -d \"data=stuff\" http:\/\/myserver.com\/rows\/1\r\ncurl -X DELETE http:\/\/myserver.com\/rows\/1<\/pre>\n<h3>3.4. Adding extra headers<\/h3>\n<p>For adding extra headers to a request, we just have to use the <code>-H<\/code> option (<code>--header<\/code>), specifying the header, and the value:<\/p>\n<pre class=\"brush:bash\">curl --header \"X-ExtraHeader: myheader\" http:\/\/myserver.com<\/pre>\n<h2>4. FTP<\/h2>\n<p>We can also manage FTP server with cURL:<\/p>\n<pre class=\"brush:bash\">curl -u username:password ftp:\/\/myftp.com\r\n# Or\r\ncurl fpt:\/\/username:password@myftp.com<\/pre>\n<p>We must take into account that, unless SSL is being used, the data will travel in plain text. If SSL is available, <code>ftps<\/code> should be use, instead of <code>ftp<\/code>.<\/p>\n<p>We can upload files pretty simply, just specifying the local file with <code>-T<\/code> option:<\/p>\n<pre class=\"brush:bash\">curl -T file.txt ftps:\/\/username:password@myftp.com\/path<\/pre>\n<p>Several files can be uploaded at once:<\/p>\n<pre class=\"brush:bash\">curl -T {file1.txt, file2.txt} ftps:\/\/username:password@myftp.com\/path<\/pre>\n<p>Downloading files from FTP server is the same as downloading a simple HTML:<\/p>\n<pre class=\"brush:bash\">curl ftps:\/\/username:password@myftp.com\/path\/file.txt -o file.txt<\/pre>\n<h2>5. Other interesting options<\/h2>\n<p>Apart from the common uses of cURL, let&#8217;s see other features that may result useful in some occasions.<\/p>\n<h3>5.1. HTTP authentication<\/h3>\n<p>With cURL is also possible to make HTTP authentication (that login prompts shown by the browser, not the authentication forms). For that, we have to use the <code>-u<\/code> (<code>--user<\/code>) option and specify the credentials:<\/p>\n<pre class=\"brush:bash\">curl -u username:password https:\/\/mylogin.com<\/pre>\n<h3>5.2. Ignoring SSL errors<\/h3>\n<p>You will probably ever have encountered a site for which the browser shows a SSL certificate error, that it can be caused because it&#8217;s expired, because the certificate authority is not trusted by the browser, or any other reason. If we want to ignore the warning and access the site, we have to give explicit consent to the browser. By default, cURL does not accept the connections with SSL errors, but we can make it ignore them with <code>-k<\/code> (<code>--insecure<\/code>) option:<\/p>\n<pre class=\"brush:bash\">curl -k https:\/\/insecure-site.com<\/pre>\n<h3>5.3. Cookies<\/h3>\n<p>Setting custom cookies with cURL is as easy as specifying them in <code>name=value<\/code> format, with\u00a0<code>-b<\/code> (<code>--cookie<\/code>) option:<\/p>\n<pre class=\"brush:bash\">curl -b \"mycookie=value\" systemcodegeeks.com<\/pre>\n<p>We can even specify the cookies from a file!<\/p>\n<pre class=\"brush:bash\">curl -b cookies.txt systemcodegeeks.com<\/pre>\n<p>And, of course, we can save the cookies to a file, with <code>-c<\/code> (<code>--cookie-jar<\/code>) option:<\/p>\n<pre class=\"brush:bash\">curl -c cookies.txt systemcodegeeks.com<\/pre>\n<h3>5.4. Making requests through proxy<\/h3>\n<p>Yes, cURL also allows to make requests through proxies. We just have to use the <code>-x<\/code> option, specifying the proxy:<\/p>\n<pre class=\"brush:bash\">curl -x https:\/\/aproxy.com systemcodegeeks.com<\/pre>\n<p>If the proxy server requires authentication, we have to specify as same as with HTTP authentication, but with\u00a0<code>--proxy-user<\/code> option:<\/p>\n<pre class=\"brush:bash\">curl -x https:\/\/aproxy.com --proxy-user username:password systemcodegeeks.com<\/pre>\n<h3>5.5. Download depending on the modification time<\/h3>\n<p>This is nice. We can make cURL download a file only if it has suffered modifications after the specified time, with <code>-z<\/code> (<code>--time-cond<\/code>) option:<\/p>\n<pre class=\"brush:bash\">curl -z 25 -Jun-16 systemcodegeeks.com<\/pre>\n<p>This feature can be specially useful for automating the task of having up-to-date documentation or software, for example.<\/p>\n<h2>6. Summary<\/h2>\n<p>This example has shown how to use cURL, from its simplest uses, which are downloading pages or making simple requests, to more advanced topics (which are actually easy with cURL), such us FTP connection, setting and saving cookies, or using proxies.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cURL is an incredibly flexible and powerful tool data transferring tool, that supports a wide variety of protocols, being the HTTP (and HTTPS) the most used. cURL library is available for many programming languages, but in this example we will see how to use it from the command line. For this tutorial, Mint 17.3 has &hellip;<\/p>\n","protected":false},"author":25,"featured_media":185,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[61],"class_list":["post-1529","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux curl Example - System Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"cURL is an incredibly flexible and powerful tool data transferring tool, that supports a wide variety of protocols, being the HTTP (and HTTPS) the most\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux curl Example - System Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"cURL is an incredibly flexible and powerful tool data transferring tool, that supports a wide variety of protocols, being the HTTP (and HTTPS) the most\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/\" \/>\n<meta property=\"og:site_name\" content=\"System Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/systemcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-04T14:00:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-04T13:56:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Toni\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Toni\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/\"},\"author\":{\"name\":\"Toni\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/69a7de154310f99cedabb63c580291b2\"},\"headline\":\"Linux curl Example\",\"datePublished\":\"2016-07-04T14:00:20+00:00\",\"dateModified\":\"2017-12-04T13:56:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/\"},\"wordCount\":787,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\",\"keywords\":[\"Linux\"],\"articleSection\":[\"BASH\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/\",\"name\":\"Linux curl Example - System Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\",\"datePublished\":\"2016-07-04T14:00:20+00:00\",\"dateModified\":\"2017-12-04T13:56:43+00:00\",\"description\":\"cURL is an incredibly flexible and powerful tool data transferring tool, that supports a wide variety of protocols, being the HTTP (and HTTPS) the most\",\"breadcrumb\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#primaryimage\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.systemcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Shell Scripting\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/shell-scripting\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"BASH\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/shell-scripting\/bash\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Linux curl Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"name\":\"System Code Geeks\",\"description\":\"Operating System Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/systemcodegeeks\",\"https:\/\/x.com\/systemcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/69a7de154310f99cedabb63c580291b2\",\"name\":\"Toni\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g\",\"caption\":\"Toni\"},\"url\":\"https:\/\/www.systemcodegeeks.com\/author\/julen-pardo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux curl Example - System Code Geeks - 2026","description":"cURL is an incredibly flexible and powerful tool data transferring tool, that supports a wide variety of protocols, being the HTTP (and HTTPS) the most","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/","og_locale":"en_US","og_type":"article","og_title":"Linux curl Example - System Code Geeks - 2026","og_description":"cURL is an incredibly flexible and powerful tool data transferring tool, that supports a wide variety of protocols, being the HTTP (and HTTPS) the most","og_url":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/","og_site_name":"System Code Geeks","article_publisher":"https:\/\/www.facebook.com\/systemcodegeeks","article_published_time":"2016-07-04T14:00:20+00:00","article_modified_time":"2017-12-04T13:56:43+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","type":"image\/jpeg"}],"author":"Toni","twitter_card":"summary_large_image","twitter_creator":"@systemcodegeeks","twitter_site":"@systemcodegeeks","twitter_misc":{"Written by":"Toni","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#article","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/"},"author":{"name":"Toni","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/69a7de154310f99cedabb63c580291b2"},"headline":"Linux curl Example","datePublished":"2016-07-04T14:00:20+00:00","dateModified":"2017-12-04T13:56:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/"},"wordCount":787,"commentCount":0,"publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","keywords":["Linux"],"articleSection":["BASH"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/","url":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/","name":"Linux curl Example - System Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#primaryimage"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","datePublished":"2016-07-04T14:00:20+00:00","dateModified":"2017-12-04T13:56:43+00:00","description":"cURL is an incredibly flexible and powerful tool data transferring tool, that supports a wide variety of protocols, being the HTTP (and HTTPS) the most","breadcrumb":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#primaryimage","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-curl-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Shell Scripting","item":"https:\/\/www.systemcodegeeks.com\/category\/shell-scripting\/"},{"@type":"ListItem","position":3,"name":"BASH","item":"https:\/\/www.systemcodegeeks.com\/category\/shell-scripting\/bash\/"},{"@type":"ListItem","position":4,"name":"Linux curl Example"}]},{"@type":"WebSite","@id":"https:\/\/www.systemcodegeeks.com\/#website","url":"https:\/\/www.systemcodegeeks.com\/","name":"System Code Geeks","description":"Operating System Developers Resource Center","publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.systemcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.systemcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/systemcodegeeks","https:\/\/x.com\/systemcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/69a7de154310f99cedabb63c580291b2","name":"Toni","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g","caption":"Toni"},"url":"https:\/\/www.systemcodegeeks.com\/author\/julen-pardo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1529"}],"version-history":[{"count":0,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1529\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media\/185"}],"wp:attachment":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}