{"id":279,"date":"2013-01-03T12:57:27","date_gmt":"2013-01-03T12:57:27","guid":{"rendered":"http:\/\/vickistan.com\/?p=279"},"modified":"2014-11-13T17:59:52","modified_gmt":"2014-11-13T17:59:52","slug":"cool-curl-commands","status":"publish","type":"post","link":"https:\/\/vickistan.com\/?p=279","title":{"rendered":"Cool curl commands"},"content":{"rendered":"<p>Using curl to GET a page<\/p>\n<p> The simplest and most common request\/operation made using HTTP is to get a<br \/>\n URL. The URL could itself refer to a web page, an image or a file. The client<br \/>\n issues a GET request to the server and receives the document it asked for.<br \/>\n If you issue the command line<\/p>\n<p>        curl http:\/\/vickistan.com<\/p>\n<p> you get a web page returned in your terminal window. The entire HTML document<br \/>\n that that URL holds.<\/p>\n<p>curl -w %{time_total},%{size_download}\\\\n -o \/dev\/null http:\/\/vickistan.com<br \/>\n% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br \/>\n                               Dload  Upload   Total   Spent    Left  Speed<br \/>\n100 25969  100 25969    0     0  14135      0  0:00:01  0:00:01 &#8211;:&#8211;:&#8211; 25509<br \/>\n1.837,25969<\/p>\n<p>curl &#8211;form upload=@testfile &#8211;form press=OK https:\/\/vickistan.com\/wp-admin\/post-new.php<\/p>\n<p>If you need to pass credentials:<\/p>\n<p>curl -u username:password http:\/\/URL<\/p>\n<p>http:\/\/curl.haxx.se\/docs\/httpscripting.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using curl to GET a page The simplest and most common request\/operation made using HTTP is to get a URL. The URL could itself refer to a web page, an image or a file. The client issues a GET request &hellip; <a href=\"https:\/\/vickistan.com\/?p=279\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-279","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=279"}],"version-history":[{"count":7,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions\/611"}],"wp:attachment":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}