{"id":14637,"date":"2023-04-19T18:11:22","date_gmt":"2023-04-19T12:41:22","guid":{"rendered":"https:\/\/www.binarytides.com\/?p=14637"},"modified":"2023-04-19T18:11:22","modified_gmt":"2023-04-19T12:41:22","slug":"curl-command-examples-in-linux","status":"publish","type":"post","link":"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/","title":{"rendered":"Curl command examples in Linux &#8211; Make HTTP requests from the command line"},"content":{"rendered":"<p>Curl (acronym for \"Client for url\") is a powerful command line tool and library for transferring files between two hosts. It supports a variety of protocols, including HTTP, SMTP, FTP, and POP3. <\/p>\t\t<div class=\"display-ad-unit mobile-wide bsa\" style=\"background:#fff3f3; height:315px;\">\n\n<!-- BinaryTides_S2S_InContent_ROS_Pos1 -->\n<style>\n\t@media only screen and (min-width: 0px) and (min-height: 0px) {\n\t\tdiv[id^=\"bsa-zone_1611170977806-3_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n\t@media only screen and (min-width: 640px) and (min-height: 480px) {\n\t\tdiv[id^=\"bsa-zone_1611170977806-3_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n<\/style>\n<div id=\"bsa-zone_1611170977806-3_123456\"><\/div>\n\n\n<\/div>\n<!-- Time: 0.00017189979553223, Pos: 202, Key: ad_unit_1 -->\n\n\n<p>A few things we can do with the curl command include:<\/p>\n<ul>\n<li>download files<\/li>\n<li>upload files<\/li>\n<li>testing services and APIs<\/li>\n<li>setting up custom headers in HTTP requests<\/li>\n<li>debug network connections<\/li>\n<\/ul>\n<p>The curl command can be used directly from the command line. This command can be invoked manually or from scripts written in bash, python or any other language. Curl is also available as an api in most programming languages like php, python etc.<\/p>\n<p>If you want to use the curl api in your programming language of choice, then you should look up the api documentation of that particular language. In this article we shall just take a quick look at how to use the curl command from the terminal in linux.<\/p>\n<p>It should be noted that command line curl is also available for Windows 10\/11. Windows 10\/11 have curl pre-installed provided directly by microsoft.<\/p>\n<p>When i run the command with the <code>--version<\/code> on Windows 10 flag it shows details like version and supported protocols.<\/p>\n<pre class=\"terminal\" >C:\\Users\\Silver&gt;curl --version\r\ncurl 7.83.1 (Windows) libcurl\/7.83.1 Schannel\r\nRelease-Date: 2022-05-13\r\nProtocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp\r\nFeatures: AsynchDNS HSTS IPv6 Kerberos Largefile NTLM SPNEGO SSL SSPI UnixSockets\r\n\r\nC:\\Users\\Silver&gt;<\/pre>\n<p>If you want the latest version of curl you can download it from their official website: <a href=\"https:\/\/curl.se\/windows\/\">https:\/\/curl.se\/windows\/<\/a><br \/>\nAlternatively you can also get curl by installing the cygwin platform.<\/p>\n<p>On my ubuntu system the number of supported protocols is more compared to windows. On linux protocols like smtp, ldap, gopher along with their ssl versions are also available.<\/p>\n<pre class=\"terminal\" >$ curl --version\r\ncurl 7.85.0 (x86_64-pc-linux-gnu) libcurl\/7.85.0 OpenSSL\/3.0.5 zlib\/1.2.11 brotli\/1.0.9 zstd\/1.5.2 libidn2\/2.3.3 libpsl\/0.21.0 (+libidn2\/2.3.2) libssh\/0.9.6\/openssl\/zlib nghttp2\/1.49.0 librtmp\/2.3\r\nRelease-Date: 2022-08-31\r\nProtocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp \r\nFeatures: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd\r\n$<\/pre>\n<h3>Examples and use cases of curl command<\/h3>\n<p>Now lets see how to use the curl command. The commands have been specifically tested on linux, but should work pretty much the same way on Windows as well.<\/p>\n<h4>1. Install curl if it's not already installed.<\/h4>\n<p>In most of the latest Linux OS versions, the curl command comes out of the box, but we may have to install it in some cases. <\/p>\n<p>For RHEL \/ CentOS<\/p>\n<pre class=\"terminal\" >$ sudo yum install curl<\/pre>\n<p>For Debian\/Ubuntu based distros<\/p>\n<pre class=\"terminal\" >$ sudo apt install curl<\/pre>\t\t<div class=\"display-ad-unit mobile-wide bsa\" style=\"background:#fff3f3; height:315px;\">\n\n\n<!-- BinaryTides_S2S_InContent_ROS_Pos2 -->\n<style>\n\t@media only screen and (min-width: 0px) and (min-height: 0px) {\n\t\tdiv[id^=\"bsa-zone_1611334361252-4_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n\t@media only screen and (min-width: 640px) and (min-height: 480px) {\n\t\tdiv[id^=\"bsa-zone_1611334361252-4_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n<\/style>\n<div id=\"bsa-zone_1611334361252-4_123456\"><\/div>\n\n\n<\/div>\n<!-- Time: 0.00017499923706055, Pos: 3750, Key: ad_unit_2 -->\n\n\n<h4>2. Check the installed version of curl.<\/h4>\n<p>This also helps to verify the installation and make sure that curl is working properly.<\/p>\n<pre class=\"terminal\" >$ curl --version \r\ncurl 7.68.0 (x86_64-pc-linux-gnu) ...<\/pre>\n<p>Basic syntax of the curl command<\/p>\n<pre class=\"terminal\" >$ curl [options] [URL]<\/pre>\n<h4>3. Perform HTTP requests with curl command.<\/h4>\n<p>By executing the below command, you should get the raw index.html or index.php (in most cases) of the subject URL. <\/p>\n<pre class=\"terminal\" >$ curl https:\/\/example.com\r\n\r\n\r\n\r\n    &lt;title&gt;Example Domain&lt;\/title&gt;\r\n\r\n    \r\n    \r\n    \r\n. . .\r\n. . . \r\n. . .<\/pre>\n<h4>4. Follow redirects.<\/h4>\n<p>curl command will not follow redirects by default. Hence, we need to specifically mention that we want the curl command to follow redirects. <\/p>\n<p>Below is an example highlighting when we use curl with redirect and when we use curl without redirect.<\/p>\n<pre class=\"terminal\" >$ curl google.com\r\n\r\n&lt;TITLE&gt;301 Moved&lt;\/TITLE&gt;\r\n&lt;H1&gt;301 Moved&lt;\/H1&gt;\r\nThe document has moved\r\n&lt;A HREF=&quot;http:\/\/www.google.com\/&quot;&gt;here&lt;\/A&gt;.<\/pre>\n<pre class=\"terminal\" >curl -L https:\/\/google.com\r\n&lt;title&gt;Google&lt;\/title&gt;(function(){window.google={kEI:&#039;YSosZK3kMreG0PEP6MS06AU&#039;,kEXPI:&#039;0,18167,1341242,6058,207,4804,2316,383,246,5,1129120,1197746,303216,77529,16114,28684,22431,1361,12320,17579,4998,13228,3847,36218,2226,2872,2891,4139,8221,50059,10631,2614,13142,3,346,230,1014,1,16916,2652,4,1528,2304,42127,13658,21223,5785,2572,4094,7596,1,11943,27099,2,3110,2,16737,23024,5679,1021,31121,4568,6256,23422,1251,5835,14968,4332,7484,445,2,2,1,23827,10960,7381,2,15968,872,19634,7,1922,9779,21391,14763,2523,3782,2007,18191,17624,2513,14,82,9800,10406,1622,1749,29,12,4965,14891,6375,2106,991,3030,427,5684,141.\r\n.\r\n.\r\n[output shortened]<\/pre>\n<p><b>Follow redirects<\/b><\/p>\n<p>You can also use the curl command with -i -L both options, which will output the full HTTP response, including the redirects.<\/p>\n<pre class=\"terminal\" >curl -i -L https:\/\/google.com<\/pre>\n<h4>5. Download a file with curl<\/h4>\n<p>Download by specifying the download file name with curl the <strong>-o<\/strong> option.<\/p>\n<pre class=\"terminal\" >$ curl -o ~\/myfile https:\/\/speed.hetzner.de\/100MB.bin \r\n% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed \r\n5 100M 5 5439k 0 0 298k 0 0:05:42 0:00:18 0:05:24 387k \r\n$ ls -ltr \r\ntotal 102656 \r\n-rw-r--r-- 1 ubuntu ubuntu 104857600 Feb 21 10:14 myfile<\/pre>\n<p>If you prefer to keep the original name as it is for the file you download, you can use -O option. However, this could replace the files you already have, hence caution is advised. <\/p>\n<pre class=\"terminal\" >$ curl -O https:\/\/speed.hetzner.de\/100MB.bin \r\n% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed \r\n2 100M 2 2511k 0 0 50378 0 0:34:41 0:00:51 0:33:50 470k<\/pre>\t\t<div class=\"display-ad-unit mobile-wide bsa\" style=\"background:#fff3f3; height:315px;\">\n<!-- BinaryTides_S2S_InContent_ROS_Pos3 -->\n<style>\n\t@media only screen and (min-width: 0px) and (min-height: 0px) {\n\t\tdiv[id^=\"bsa-zone_1672330111515-1_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n\t@media only screen and (min-width: 640px) and (min-height: 480px) {\n\t\tdiv[id^=\"bsa-zone_1672330111515-1_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n<\/style>\n<div id=\"bsa-zone_1672330111515-1_123456\"><\/div>\n<\/div>\n<!-- Time: 0.00018095970153809, Pos: 7329, Key: ad_unit_3 -->\n\n\n<p>When downloading a file with curl, it shows a download meter with additional details. If you prefer a progress bar instead of the download meter, you can use -# as an option. Also, you could use -silent to disable everything. <\/p>\n<h4>6. Download \/ Upload files using FTP, SFTP, SCP protocols.<\/h4>\n<p>In most cases (also the best practice) the FTP, SFTP, SCP protocols will be protected by passwords. Hence, we will have to provide authentication credentials when using the curl command.<\/p>\n<pre class=\"terminal\" >$ curl -u demo:password ftp:\/\/test.rebex.net \r\n10-19-20 03:19PM  pub \r\n12-17-21 11:58AM 405 readme.txt<\/pre>\n<p>Download files with SSH Key using SFTP protocol <\/p>\n<pre class=\"terminal\" >$ curl -u username: --key ~\/path-to-private-key -O \r\nsftp:\/\/sftp.example.com\/folder\/filename<\/pre>\n<p><b>Resume paused or broken downloads<\/b><\/p>\n<p>The -C option can be used to resume the downloads which have been stopped due to many reasons.<\/p>\n<pre class=\"terminal\" >$ curl -C - -O ftp:\/\/ftp.example.com\/folder\/filename<\/pre>\n<p><b>Rate limiting<\/b><\/p>\n<p>Rate limiting comes in handy when you don't want to use all the bandwidth you have for the curl download or upload. You can specify how much data rate you would like to allow for the download. <\/p>\n<pre class=\"terminal\" >$ curl --limit-rate 1000K -O ftp:\/\/ftp.example.com\/folder\/filename<\/pre>\n<p>This limits the download speed to 1000K per second. <\/p>\n<p>The given speed is measured in bytes\/second, unless a suffix is appended. Appending 'k' or 'K' will count the number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it gigabytes. Examples: 100K, 2m and 3G. <\/p>\n<p><b>Upload files to FTP\/SFTP server<\/b><\/p>\n<p>the -T option is used when uploading a file to a destination server.<\/p>\n<pre class=\"terminal\" >$ curl -u {username}:{password} -T {filename} {FTP_Location}<\/pre>\n<p>If you want to append an already existing FTP file, you can use the -a or \u2013append option.<\/p>\n<h4>7. How to use the curl command through a proxy server.<\/h4>\n<p>A proxy server is used when someone wants to route the traffic through another endpoint instead of directly communicating with the destination server. There can be few reasons to use a proxy server in an organization. <\/p>\n<ul>\n<li>Accessing blocked content<\/li>\n<li>Enhancing security<\/li>\n<li>Improving performance<\/li>\n<\/ul>\n<p>In short, it's useful to use a proxy server with curl command to access restricted content, for enhanced security and to improve performance. <\/p>\n<pre class=\"terminal\" >$ curl -x [proxy_name]:[port] [URL...]<\/pre>\n<p>Additionally you can use the below syntax to authenticate to a proxy server where it's required. <\/p>\n<pre class=\"terminal\" >$ curl -u [user]:[password] -x [proxy_name]:[port] [URL...]<\/pre>\n<h4>8. How to change the user agent<\/h4>\n<p>In some cases, the remote web server may refuse HTTP requests from the curl command. To avoid this, we can simulate a browser and create an HTTP request as if it were coming from a browser. We may accomplish this by using the -A option in conjunction with the curl command.<\/p>\t\t<div class=\"display-ad-unit mobile-wide bsa\" style=\"background:#fff3f3; height:315px;\">\n\n<!-- BinaryTides_S2S_InContent_ROS_Pos4 -->\n<style>\n\t@media only screen and (min-width: 0px) and (min-height: 0px) {\n\t\tdiv[id^=\"bsa-zone_1672740659643-7_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n\t@media only screen and (min-width: 640px) and (min-height: 480px) {\n\t\tdiv[id^=\"bsa-zone_1672740659643-7_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n<\/style>\n<div id=\"bsa-zone_1672740659643-7_123456\"><\/div>\n\n<\/div>\n<!-- Time: 0.00019598007202148, Pos: 11024, Key: ad_unit_4 -->\n\n\n<pre class=\"terminal\" >curl -A &quot;Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/58.0.3029.110 Safari\/537.3&quot; https:\/\/example.com\/scrape-data<\/pre>\n<h4>9. How to send a cookie with curl<\/h4>\n<p>Cookies are a block of data that stores session information, user preferences, etc. However, they can also be used to authenticate a user to a server. When making HTTP requests, we can add '-b' or '--cookie' option.<\/p>\n<p>You can use the below syntax to send a cookie with a curl command.<\/p>\n<p>curl -b \"cookie_name=cookie_value\" https:\/\/example.com<\/p>\n<pre class=\"terminal\" >curl -L -b &quot;oraclelicense=a&quot; -O http:\/\/download.oracle.com\/otn-pub\/java\/jdk\/10.0.2+13\/19aef61b38124481863b1413dce1855f\/jdk-10.0.2_linux-x64_bin.rpm\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\n100   545  100   545    0     0    587      0 --:--:-- --:--:-- --:--:--     0\r\n100  7073  100  7073    0     0   2322      0  0:00:03  0:00:03 --:--:--  8841<\/pre>\n<h4>10. How to use curl to test web services, including verifying HTTP response codes, testing timeouts.<\/h4>\n<p>There are situations where the server can't reach HTTP destinations or is unable to download packages through package managers such as yum and apt. In a situation like this, the most common practice is to do a ping test to an outside IP address and then to do a ping test to an outside DNS to make sure the traffic is reaching both IPs and DNS as well. <\/p>\n<p>But there are special cases, where even when you can reach outside via IP &amp; DNS, you might still not be able to browse the internet. The most common problem for this is the firewall restrictions on ports 80 or 443, where the firewalls of the organization restrict web browsing for the source server\/computer. <\/p>\n<p>To troubleshoot this, we can use the telnet command. But most of the time, the telnet command is not installed by default. Since you don't have the internet at the moment, you'll find it difficult to install it as a fresh package as well. curl command comes in handy in a situation like this because it can check the connectivity with HTTP HTTPS ports. <\/p>\n<pre class=\"terminal\" >$ curl -v https:\/\/www.google.com<\/pre>\n<p>With this method, you can analyze the response and see if there are any issues with the network connectivity using curl. <\/p>\n<p>In a situation where you have hosted a web server such as NGINX or Apache in one of the servers in the local network, and the server doesn't have a GUI to check the HTTP response from a browser window, you can simply use the curl command mentioning the localhost as the destination server. You will be able to get an HTTP response with headers. <\/p>\n<h4>9. How to use curl with SSL and TLS connections.<\/h4>\t\t<div class=\"display-ad-unit mobile-wide bsa\" style=\"background:#fff3f3; height:315px;\">\n\n<!-- BinaryTides_S2S_InContent_ROS_Pos5 -->\n<style>\n\t@media only screen and (min-width: 0px) and (min-height: 0px) {\n\t\tdiv[id^=\"bsa-zone_1672740746864-5_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n\t@media only screen and (min-width: 640px) and (min-height: 480px) {\n\t\tdiv[id^=\"bsa-zone_1672740746864-5_123456\"] {\n\t\t\tmin-width: 300px;\n\t\t\tmin-height: 250px;\n\t\t}\n\t}\n<\/style>\n<div id=\"bsa-zone_1672740746864-5_123456\"><\/div>\n\n<\/div>\n<!-- Time: 0.00022196769714355, Pos: 14565, Key: ad_unit_5 -->\n\n\n<p>curl is a robust tool. It can handle many secure protocols, including HTTPS which protects the data that you transfer with SSL\/TSL encryption. From this section, you can get to know the steps to use curl with SSL and TLS connection. This will also guide you on how to add certificates, private keys, and CA certificates with the curl command. <\/p>\n<p><b>Specify SSL\/TLS Version<\/b><\/p>\n<p>By default, curl is using the most recent version of the SSL\/TLS present on the server. In a situation where you don't want to use the latest version of SSL\/TLS on the server, you can specify the version you need using --tlsv1.0, --tlsv1.1, or --tlsv1.2 options. As an example, if you would like to use TLS 1.2, you may follow the below command to achieve the same. <\/p>\n<pre class=\"terminal\" >$ curl --tlsv1.2 https:\/\/example.com<\/pre>\n<p><b>SSL\/TLS certificate verification<\/b><\/p>\n<p>curl is verifying the SSL\/TLS certificate provided by the server to validate if it's a valid certificate and if it's issued by a trusted certificate authority (CA), by default. Sometimes you might want to deactivate this manually when you don't have a valid SSL\/TLS signed by a trusted CA. This can happen if someone installed a Self Signed Certificate to their web servers. But this method is not recommended because it can expose your connection to a man-in-the-middle attack. <\/p>\n<p>To deactivate the SSL\/TLS verification, you may use --insecure or -k options<\/p>\n<pre class=\"terminal\" >$ curl -k https:\/\/example.com<\/pre>\n<p>This will help you connect to the server, bypassing the SSL\/TLS verification. But keep in mind that you must use this within trusted environments only. <\/p>\n<p>If you have the certificate bundle of private CA, you can use it with the curl command. This will allow you to access servers with web servers which don't have a SSL\/TLS certificate signed by a global CA with curl command. <\/p>\n<pre class=\"terminal\" >$ curl --cacert \/etc\/ssl\/certs\/ca-bundle.crt https:\/\/example.com<\/pre>\n<p>In some configurations, the server is requesting a client-side SSL\/TLS as well for authentication. In this case, you need to provide the client-side certificate and the private key in order to make a successful connection with the server. Assuming your client-side certificate file is client.crt and the private key is client.key, you can use the below command to authenticate to this type of a server. <\/p>\n<pre class=\"terminal\" >$ curl --cert \/path\/to\/certs\/client.crt --key \/path\/to\/certs\/client.key \r\nhttps:\/\/example.com<\/pre>\n<p>If your SSL\/TLS certificate is encrypted with a passphrase, you can use --pass option to provide the passphrase with the curl command.<\/p>\n<pre class=\"terminal\" >$ curl --cert \/path\/to\/certs\/client.crt --key \/path\/to\/certs\/client.key --pass password \r\nhttps:\/\/example.com<\/pre>\n<p>If you have a SSL\/TLS certificate with a PKCS#12 file, then you can use this with the curl command as follows. <\/p>\n<pre class=\"terminal\" >$ curl --cert-type P12 --cert \/path\/to\/certs\/client.p12 https:\/\/example.com<\/pre>\n<h3>Conclusion<\/h3>\n<p>On linux there are actually many tools for performing http requests from the command line and curl is one of them. Tools like wget can also be used for this task, but those are available only as stand-alone applications. <\/p>\n<p>Curl on the other hand provides programming apis which makes it a widely used tool.<\/p>\n<p>Curl can be used to automate content transfer between hosts through scripting. This is useful in scenarios when you need to automatically upload\/download files across servers.<\/p>\n<p>Let us know how you are using curl on your linux machines and servers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Curl (acronym for &#8220;Client for url&#8221;) is a powerful command line tool and library for transferring files between two hosts. It supports a variety of protocols, including HTTP, SMTP, FTP, and POP3. A few things we can do with the curl command include: download files upload files testing services and APIs setting up custom headers&#8230; <span class=\"read-more\"><a href=\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":15958,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[855,69],"tags":[],"class_list":["post-14637","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-commands","category-networking"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Curl command examples in Linux - Make HTTP requests from the command line - BinaryTides<\/title>\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.binarytides.com\/curl-command-examples-in-linux\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Silver Moon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/\",\"url\":\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/\",\"name\":\"Curl command examples in Linux - Make HTTP requests from the command line - BinaryTides\",\"isPartOf\":{\"@id\":\"https:\/\/www.binarytides.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2023\/09\/no-thumbnail.jpg\",\"datePublished\":\"2023-04-19T12:41:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.binarytides.com\/#\/schema\/person\/ce24c6ddfa0368f9a08bcf46505884dd\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#primaryimage\",\"url\":\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2023\/09\/no-thumbnail.jpg\",\"contentUrl\":\"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2023\/09\/no-thumbnail.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.binarytides.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Curl command examples in Linux &#8211; Make HTTP requests from the command line\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.binarytides.com\/#website\",\"url\":\"https:\/\/www.binarytides.com\/\",\"name\":\"BinaryTides\",\"description\":\"News, Technology, Entertainment and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.binarytides.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.binarytides.com\/#\/schema\/person\/ce24c6ddfa0368f9a08bcf46505884dd\",\"name\":\"Silver Moon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.binarytides.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/67ac3d58b656585dc0201e900a67f4197eb0c3ef2d1f83dd8f95a0b497cd97da?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/67ac3d58b656585dc0201e900a67f4197eb0c3ef2d1f83dd8f95a0b497cd97da?s=96&r=g\",\"caption\":\"Silver Moon\"},\"description\":\"A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at binarytides@gmail.com.\",\"url\":\"https:\/\/www.binarytides.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Curl command examples in Linux - Make HTTP requests from the command line - BinaryTides","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.binarytides.com\/curl-command-examples-in-linux\/","twitter_misc":{"Written by":"Silver Moon","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/","url":"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/","name":"Curl command examples in Linux - Make HTTP requests from the command line - BinaryTides","isPartOf":{"@id":"https:\/\/www.binarytides.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2023\/09\/no-thumbnail.jpg","datePublished":"2023-04-19T12:41:22+00:00","author":{"@id":"https:\/\/www.binarytides.com\/#\/schema\/person\/ce24c6ddfa0368f9a08bcf46505884dd"},"breadcrumb":{"@id":"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#primaryimage","url":"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2023\/09\/no-thumbnail.jpg","contentUrl":"https:\/\/www.binarytides.com\/blog\/wp-content\/uploads\/2023\/09\/no-thumbnail.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/www.binarytides.com\/curl-command-examples-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.binarytides.com\/"},{"@type":"ListItem","position":2,"name":"Curl command examples in Linux &#8211; Make HTTP requests from the command line"}]},{"@type":"WebSite","@id":"https:\/\/www.binarytides.com\/#website","url":"https:\/\/www.binarytides.com\/","name":"BinaryTides","description":"News, Technology, Entertainment and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.binarytides.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.binarytides.com\/#\/schema\/person\/ce24c6ddfa0368f9a08bcf46505884dd","name":"Silver Moon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.binarytides.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/67ac3d58b656585dc0201e900a67f4197eb0c3ef2d1f83dd8f95a0b497cd97da?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/67ac3d58b656585dc0201e900a67f4197eb0c3ef2d1f83dd8f95a0b497cd97da?s=96&r=g","caption":"Silver Moon"},"description":"A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at binarytides@gmail.com.","url":"https:\/\/www.binarytides.com\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/posts\/14637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/comments?post=14637"}],"version-history":[{"count":8,"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/posts\/14637\/revisions"}],"predecessor-version":[{"id":14763,"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/posts\/14637\/revisions\/14763"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/media\/15958"}],"wp:attachment":[{"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/media?parent=14637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/categories?post=14637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.binarytides.com\/wp-json\/wp\/v2\/tags?post=14637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}