{"id":11344,"date":"2016-03-07T16:15:12","date_gmt":"2016-03-07T14:15:12","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=11344"},"modified":"2017-12-21T15:32:59","modified_gmt":"2017-12-21T13:32:59","slug":"jquery-http-get-post-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/","title":{"rendered":"jQuery Http Get \/ Post Example"},"content":{"rendered":"<p>The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery <code>get()<\/code> and <code>post()<\/code> methods are used to request data from the server with an HTTP GET or POST request.<\/p>\n<p>These are the two commonly used methods for a request-response between a client and server. GET requests data from a specified resource while POST submits data to be processed to a specified resource. GET is basically used for just getting (retrieving) some data from the server. <\/p>\n<p>It may also return cached data. POST can also be used to get some data from the server. However, the POST method NEVER caches data, and is often used to send data along with the request.<br \/>\n&nbsp;<br \/>\n[ulp id=&#8217;qGGDqWnle19VavkM&#8217;]<\/p>\n<h2>1. Basic Document Setup<\/h2>\n<p>To begin, create a new HTML file with the basic syntax inside and also a new PHP file which will be used for testing:<\/p>\n<p><span style=\"text-decoration: underline\"><em>main.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;jQuery HTTP Post\/Get Example&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- HTML SECTION  --&gt;\r\n\r\n\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script src=\"jquery-1.11.3.min.js\"&gt;&lt;\/script&gt;\r\n\r\n&lt;script type=\"text\/javascript\"&gt;\r\n\r\n&lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Don&#8217;t forget to include the jQuery link, which in this case is linked locally.<\/p>\n<p><span style=\"text-decoration: underline\"><em>process.php<\/em><\/span><\/p>\n<pre class=\"brush:php\">\r\n&lt;?php\r\n\/\/ php code goes here\r\n?&gt;\r\n<\/pre>\n<p>Now, we&#8217;re ready to explain and apply both methods.<\/p>\n<h2>2. jQuery POST Method<\/h2>\n<p>The jQuery POST method loads a page from the server using a POST HTTP request, and returns XMLHttpRequest object.<\/p>\n<p>The syntax used is: <code>$.post( url, [data], [callback], [type] )<\/code> where:<\/p>\n<ul>\n<li><strong>url<\/strong> \u2212 A string containing the URL to which the request is sent<\/li>\n<li><strong>data<\/strong> \u2212 This optional parameter represents key\/value pairs or the return value of the <code>.serialize()<\/code> function that will be sent to the server.<\/li>\n<li><strong>callback<\/strong> \u2212 This optional parameter represents a function to be executed whenever the data is loaded successfully.<\/li>\n<li><strong>type<\/strong> \u2212 This optional parameter represents a type of data to be returned to callback function: &#8220;xml&#8221;, &#8220;html&#8221;, &#8220;script&#8221;, &#8220;json&#8221;, &#8220;jsonp&#8221;, or &#8220;text&#8221;.<\/li>\n<\/ul>\n<p>Let&#8217;s now see an example where we use the method with predefined values like so:<\/p>\n<p><span style=\"text-decoration: underline\"><em>process.php<\/em><\/span><\/p>\n<pre class=\"brush:php\">\r\n&lt;?php\r\nif( $_REQUEST[\"name\"] ) {\r\n\r\n   $name = $_REQUEST['name'];\r\n   echo \"Hi there, \". $name;\r\n}\r\n?&gt;\r\n<\/pre>\n<p>In HTML, we&#8217;d have a message and a button to trigger the method:<\/p>\n<p><span style=\"text-decoration: underline\"><em>main.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;p&gt;Click on the button to see the result.&lt;\/p&gt;\r\n\r\n&lt;p id = \"message\"&gt;Message Here&lt;\/p&gt;\r\n&lt;button id = \"btn\"&gt;Load Data&lt;\/button&gt;\r\n<\/pre>\n<p><span style=\"text-decoration: underline\"><em>main.html<\/em><\/span><\/p>\n<pre class=\"brush:js\">\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script src=\"jquery-1.11.3.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script type = \"text\/javascript\"&gt;\r\n         $(document).ready(function() {   \/\/ wait for document to fully load\r\n            $(\"#btn\").click(function(event){ \/\/ capture a click on the button\r\n               $.post(  \/\/ define a post method\r\n                  \"process.php\", \/\/ the url where info is going to be posted\r\n                  { name: \"Fabio\" },   \/\/ data\r\n                  function(data) {  \/\/ callback function\r\n                     $('#message').html(data);  \/\/ add result to the p with id=\"message\"\r\n                  }\r\n               );\r\n            });\r\n         });\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>The result would be:<\/p>\n<figure id=\"attachment_11363\" aria-describedby=\"caption-attachment-11363\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-1.jpg\" rel=\"attachment wp-att-11363\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-1.jpg\" alt=\"Using the jQuery Post Method\" width=\"820\" height=\"238\" class=\"size-full wp-image-11363\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-1.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-1-300x87.jpg 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-1-768x223.jpg 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-11363\" class=\"wp-caption-text\">Using the jQuery Post Method<\/figcaption><\/figure>\n<h2>3. jQuery GET Method<\/h2>\n<p>The jQuery GET method loads data from the server using a GET HTTP request. The method returns XMLHttpRequest object. The most basic syntax of the method is: <code>$.get( url, [data], [callback], [type] )<\/code> where:<\/p>\n<ul>\n<li><strong>url<\/strong> \u2212 A string containing the URL to which the request is sent<\/li>\n<li><strong>data<\/strong> \u2212 This optional parameter represents key\/value pairs that will be sent to the server.<\/li>\n<li><strong>callback<\/strong> \u2212 This optional parameter represents a function to be executed whenever the data is loaded successfully.<\/li>\n<li><strong>type<\/strong> \u2212 This optional parameter represents a type of data to be returned to callback function: &#8220;xml&#8221;, &#8220;html&#8221;, &#8220;script&#8221;, &#8220;json&#8221;, &#8220;jsonp&#8221;, or &#8220;text&#8221;.<\/li>\n<\/ul>\n<p>The example of GET pretty similar. Let&#8217;s have the same php file:<\/p>\n<p><span style=\"text-decoration: underline\"><em>process.php<\/em><\/span> <\/p>\n<pre class=\"brush:php\">\r\n&lt;?php\r\nif( $_REQUEST[\"name\"] ) {\r\n\r\n   $name = $_REQUEST['name'];\r\n   echo \"Hi there, \". $name;\r\n}\r\n?&gt;\r\n<\/pre>\n<p>Now the only thing that is going to change is the method. Whoa! Why is that, isn&#8217;t any other differences? Of course there is. Continue reading below to find out the differences.<\/p>\n<p><span style=\"text-decoration: underline\"><em>main.html<\/em><\/span><\/p>\n<pre class=\"brush:js\">\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script src=\"jquery-1.11.3.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script type = \"text\/javascript\"&gt;\r\n         $(document).ready(function() {   \/\/ wait for document to fully load\r\n            $(\"#btn\").click(function(event){ \/\/ capture a click on the button\r\n               $.get(  \/\/ define a post method\r\n                  \"process.php\", \/\/ the url where info is going to be posted\r\n                  { name: \"Fabio\" },   \/\/ data\r\n                  function(data) {  \/\/ callback function\r\n                     $('#message').html(data);  \/\/ add result to the p with id=\"message\"\r\n                  }\r\n               );\r\n            });\r\n         });\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>Needles to say, the result would be exactly the same. Now let&#8217;s consider talking about what are the differences about these two methods, which seem to be producing the same result.<\/p>\n<h2>4. Differences between POST &amp; GET<\/h2>\n<p>There are quite considerable distinctions between POST &amp; GET. The following table is an essential overview:<\/p>\n<figure id=\"attachment_11366\" aria-describedby=\"caption-attachment-11366\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-2.jpg\" rel=\"attachment wp-att-11366\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-2.jpg\" alt=\"HTTP Methods: GET vs. POST\" width=\"820\" height=\"680\" class=\"size-full wp-image-11366\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-2.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-2-300x249.jpg 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/get-post-2-768x637.jpg 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-11366\" class=\"wp-caption-text\">HTTP Methods: GET vs. POST<\/figcaption><\/figure>\n<h2>5. Conclusion<\/h2>\n<p>The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. HTTP works as a request-response protocol between a client and server. A web browser may be the client, and an application on a computer that hosts a web site may be the server. So, which one should you use? Use POST for destructive actions such as creation, editing, and deletion, because you can&#8217;t hit a POST action in the address bar of your browser. Use GET when it&#8217;s safe to allow a person to call an action.<\/p>\n<h2>6. Download the source code<\/h2>\n<p>This was an example about JQuery Http Get \/ Post.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>You can download the full source code of this example here: <a><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/jQuery-HTTP-Post-Get.zip\"><strong>jQuery HTTP Post &amp; Get<\/strong><\/a><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery get() and post() methods are used to request data from the server with an HTTP GET or POST request. These are the two commonly used methods for a request-response between a client and server. GET requests &hellip;<\/p>\n","protected":false},"author":75,"featured_media":919,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-11344","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>jQuery Http Get \/ Post Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery get() and post() methods are used to request data from the\" \/>\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.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"jQuery Http Get \/ Post Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery get() and post() methods are used to request data from the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabiocimo\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-07T14:15:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-21T13:32:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-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=\"Fabio Cimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabiocimo\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabio Cimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"jQuery Http Get \/ Post Example\",\"datePublished\":\"2016-03-07T14:15:12+00:00\",\"dateModified\":\"2017-12-21T13:32:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/\"},\"wordCount\":670,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"articleSection\":[\"jQuery\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/\",\"name\":\"jQuery Http Get \/ Post Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"datePublished\":\"2016-03-07T14:15:12+00:00\",\"dateModified\":\"2017-12-21T13:32:59+00:00\",\"description\":\"The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery get() and post() methods are used to request data from the\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"jQuery\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jQuery Http Get \/ Post Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\",\"name\":\"Fabio Cimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"caption\":\"Fabio Cimo\"},\"description\":\"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fabiocimo\",\"https:\/\/al.linkedin.com\/in\/fabiocimo\",\"https:\/\/x.com\/fabiocimo\",\"https:\/\/www.youtube.com\/fabiocimo1\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"jQuery Http Get \/ Post Example - Web Code Geeks - 2026","description":"The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery get() and post() methods are used to request data from the","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.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/","og_locale":"en_US","og_type":"article","og_title":"jQuery Http Get \/ Post Example - Web Code Geeks - 2026","og_description":"The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery get() and post() methods are used to request data from the","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/fabiocimo","article_published_time":"2016-03-07T14:15:12+00:00","article_modified_time":"2017-12-21T13:32:59+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","type":"image\/jpeg"}],"author":"Fabio Cimo","twitter_card":"summary_large_image","twitter_creator":"@fabiocimo","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Fabio Cimo","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"jQuery Http Get \/ Post Example","datePublished":"2016-03-07T14:15:12+00:00","dateModified":"2017-12-21T13:32:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/"},"wordCount":670,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","articleSection":["jQuery"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/","name":"jQuery Http Get \/ Post Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","datePublished":"2016-03-07T14:15:12+00:00","dateModified":"2017-12-21T13:32:59+00:00","description":"The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery get() and post() methods are used to request data from the","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-http-get-post-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"jQuery","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/"},{"@type":"ListItem","position":4,"name":"jQuery Http Get \/ Post Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22","name":"Fabio Cimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","caption":"Fabio Cimo"},"description":"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.","sameAs":["https:\/\/www.facebook.com\/fabiocimo","https:\/\/al.linkedin.com\/in\/fabiocimo","https:\/\/x.com\/fabiocimo","https:\/\/www.youtube.com\/fabiocimo1"],"url":"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/11344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=11344"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/11344\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/919"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=11344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=11344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=11344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}