{"id":282,"date":"2014-02-26T15:23:44","date_gmt":"2014-02-26T15:23:44","guid":{"rendered":"http:\/\/loadfocus.com\/blog\/?p=282"},"modified":"2014-02-26T15:23:44","modified_gmt":"2014-02-26T15:23:44","slug":"what-is-a-http-get-request","status":"publish","type":"post","link":"https:\/\/loadfocus.com\/blog\/2014\/02\/what-is-a-http-get-request","title":{"rendered":"What is a HTTP GET Request?"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> &lt; 1<\/span> <span class=\"rt-label rt-postfix\">minute read<\/span><\/span><p class=\"lead\"><!-- pn-tldr --><\/p>\n<h2>Key takeaways<\/h2>\n<ul>\n<li>GET retrieves a resource and should never change server state.<\/li>\n<li>It is cacheable and idempotent, which is why it suits reads and not actions.<\/li>\n<li>Parameters ride in the URL, so never put secrets in a GET.<\/li>\n<\/ul>\n<p><!-- \/pn-tldr -->The <strong><a title=\"what is HTTP\" href=\"https:\/\/loadfocus.com\/blog\/2014\/02\/what-is-http\/\" target=\"_blank\">HTTP<\/a>\u00a0&#8220;GET&#8221;<\/strong> method is used just for retrieving data and should have no other effect.<\/p>\n<p>When you enter a URI in the browser or you click on a link you are executing a GET request. Here are some characteristics of GET requests: can be cached, bookmarked, appear in browser history.<\/p>\n<p>You can easily find details about all the requests made, when accessing an URI, by opening the Developer Tools in the browser and inspecting the network traffic.<\/p>\n<p>GET requests don&#8217;t necessarily have to be made from the browser, you can make AJAX GET requests and use other tools in this purpose.<!-- pn-faq --><\/p>\n<h2>Frequently Asked Questions<\/h2>\n<h3>What is a GET request for?<\/h3>\n<p>Retrieving a resource. It should have no other effect, which is what lets browsers, proxies and caches treat it as safe to repeat.<\/p>\n<h3>Why does that matter in practice?<\/h3>\n<p>Because GET is cacheable and idempotent. Anything that changes state behind a GET can be repeated by a prefetch, a crawler or a retry without anyone intending it.<\/p>\n<h3>Can I put credentials in a GET?<\/h3>\n<p>No. Parameters ride in the URL, which ends up in browser history, server logs and referrer headers. Secrets belong in the body or a header.<\/p>\n<p><!-- \/pn-faq --><!-- pn-related-reading --><\/p>\n<h2>Related reading<\/h2>\n<ul>\n<li><a href=\"https:\/\/loadfocus.com\/blog\/2014\/02\/what-is-http-post-request\">What is HTTP POST Request?<\/a><\/li>\n<li><a href=\"https:\/\/loadfocus.com\/blog\/2014\/02\/what-is-http\">What is HTTP?<\/a><\/li>\n<li><a href=\"https:\/\/loadfocus.com\/blog\/2016\/04\/5-tips-to-boost-page-speed-and-website-seo\">5 Tips to Boost Page Speed and Website SEO<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> &lt; 1<\/span> <span class=\"rt-label rt-postfix\">minute read<\/span><\/span>Key takeaways GET retrieves a resource and should never change server state. It is cacheable and idempotent, which is why it suits reads and not actions. Parameters ride in the URL, so never put secrets in a GET. The HTTP\u00a0&#8220;GET&#8221; method is used just for retrieving data and should have no other effect. When you&#8230;  <a href=\"https:\/\/loadfocus.com\/blog\/2014\/02\/what-is-a-http-get-request\" class=\"more-link\" title=\"Read What is a HTTP GET Request?\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3738,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,104],"tags":[],"class_list":["post-282","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-test-automation","category-website-speed-testing"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/comments?post=282"}],"version-history":[{"count":0,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts\/282\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/media\/3738"}],"wp:attachment":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/media?parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/categories?post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/tags?post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}