{"id":25995,"date":"2020-11-23T01:37:17","date_gmt":"2020-11-23T09:37:17","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=25995"},"modified":"2021-02-09T06:26:06","modified_gmt":"2021-02-09T14:26:06","slug":"jquery-post","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/jquery-post\/","title":{"rendered":"How to Make a jQuery post() Request"},"content":{"rendered":"\n<p>When building a web app, it is inevitable that we will have to create something from data a user inputs. This could be creating a new user account when someone submits their information through a sign up form, or creating a new recipe from your awesome new recipe organizer app.&nbsp; Going from user data in a form to a fresh new instance of a recipe saved to your database requires a <code>HTTP POST<\/code> request.&nbsp;<br><\/p>\n\n\n\n<p>A POST request is what sends the data from the form to the server where it can be created in a backend or API and saved to a database. By default, submitting a form requires a redirect or page refresh. While this is perfectly fine for small apps, we want to provide a quicker loading experience so we will override this behavior<br><\/p>\n\n\n\n<p>Using the jQuery <code>post()<\/code> request allows us to make the HTTP request, get back a response, and choose how we display the data all without a redirect or refresh! Let\u2019s look a little closer at what <code>post() <\/code>needs in order to do all of this.&nbsp;<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Closer Look at post()<\/h2>\n\n\n\n<p>HTTP requests are like a game of catch. The browser throws a request to the server via API endpoint, and the server throws back a response. What post() does is send data to the endpoint that will be created and saved in the app\u2019s database.&nbsp;<br><\/p>\n\n\n\n<p>Taking all of the above into consideration, we can assume <code>post()<\/code> takes some arguments, right? Right! <code>post()<\/code> takes up to four arguments, but for our purposes, we are focusing on the main two: the URL destination and the data we are sending to that destination.&nbsp;<\/p>\n\n\n\n<p><em><code>$.post(\u2018\/recipes\u2019, data)&nbsp;<\/code><\/em><code><br><\/code><\/p>\n\n\n\n<p>Taking our recipe organizing app example, we begin with our <code>jQuery<\/code> selector $. By invoking the <code>post() <\/code>method, we are sending our data to the URL of <code>\u2018\/recipes.\u2019<\/code> So far, so good. We\u2019ve thrown some data to our server. Now, we get ready to catch the response!&nbsp;<br><\/p>\n\n\n\n<p>What comes back to us as a response is what is known as a<code> jQuery XHR <\/code>object, or <code>jqXHR<\/code>, which implements the Promise interface. Not to worry! Although that last sentence may sound scary, it\u2019s telling us that the response is just an object. With jQuery\u2019s handy <code>done()<\/code> method,&nbsp; that object can be organized into a more legible format.<br><\/p>\n\n\n\n<p>Keeping with our game of catch analogy, we throw data to the server with <code>post()<\/code>. We are thrown back a <code>jqXHR<\/code> object, which we pass to <code>done() <\/code>so we can see what we caught. Now that we\u2019ve closely <code>examined post()<\/code>, let\u2019s see how to use it.&nbsp;<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">jQuery post()<\/h2>\n\n\n\n<p>To begin, we have a plain HTML form:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js&quot;&gt;&lt;\/script&gt;\n\n&lt;h2&gt;\n  New Recipe\n&lt;\/h2&gt;\n&lt;form id='new-recipe'&gt;\n&lt;label for=&quot;name&quot;&gt;Recipe Name&lt;\/label&gt;&lt;br&gt;\n&lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot;&gt;&lt;br&gt;\n&lt;label for=&quot;ingredients&quot;&gt;Ingredients&lt;\/label&gt;&lt;br&gt;\n&lt;input type=&quot;text&quot; name=&quot;ingredients&quot; id=&quot;ingredients&quot;&gt;&lt;br&gt;\n&lt;button type=&quot;submit&quot;&gt;\nCreate Recipe \n&lt;\/button&gt;\n&lt;\/form&gt;\n<\/pre><\/div>\n\n\n\n<p>Which displays the form as such:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"224\" height=\"170\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-11-at-9.42.31-PM-1.jpg\" alt=\"\" class=\"wp-image-25997\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-11-at-9.42.31-PM-1.jpg 224w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-11-at-9.42.31-PM-1-20x15.jpg 20w\" sizes=\"auto, (max-width: 224px) 100vw, 224px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>By default, when a <code>submit<\/code> button is clicked, the browser will refresh or redirect. Remember we want to avoid a page refresh or redirect? If the page refreshes or redirects, we lose all of our data from the form. To avoid redirecting and losing data, we have the JavaScript <code>preventDefault() <\/code>method.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;script&gt;\n  $(document).ready(() =&gt; {\n    $('#new-recipe').submit((event) =&gt; {\n      event.preventDefault();\n    })\n  })\n\n&lt;\/script&gt;\n<\/pre><\/div>\n\n\n\n<p>We are waiting until the page or <code>document<\/code> loads, then listening for then the submit button is clicked on the form with an id of <code>new-recipe.<\/code> This is accomplished with the <code>.submit()<\/code> method that takes a callback function with the click event as an argument. To review, a JavaScript callback function is a function we can pass as an argument to another function to be executed later.<br><\/p>\n\n\n\n<p>From inside this callback function, we can stop the default redirect with <code>preventDefault()<\/code>. Now, we are no longer redirecting and can begin to submit some data to the server.&nbsp;<br><\/p>\n\n\n\n<p>Before we invoke <code>post()<\/code> to send data, we need data! Where do we get this data from?&nbsp;<br><\/p>\n\n\n\n<p>We get the data from the form. Since we are no longer redirecting, we have access to the values in the text inputs of the form. What\u2019s going on with that <code>serialize()<\/code> method?<br><\/p>\n\n\n\n<p>The <code>serialize() <\/code>method is called on the form we have selected with the <em>this<\/em> keyword. What <code>serialize()<\/code> does is convert the form data into a text string in standard URL-encoded notation, which can be sent to the server.&nbsp;<br><\/p>\n\n\n\n<p>Once we have properly serialized our form data, we store it in a variable:&nbsp;<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>  $(document).ready(() =&gt; {\n    $('#new-recipe').submit((event) =&gt; {\n      event.preventDefault();\n     var values = $(this).serialize();\n    })\n  })\n<\/pre><\/div>\n\n\n\n<p>Now we have our data stored in the values variable, we can now send it off to the server!<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>  $(document).ready(() =&gt; {\n    $('#new-recipe').submit((event) =&gt; {\n      event.preventDefault();\n     var values = $(this).serialize();\n     var posting = $.post('\/recipes', values);\n    })\n  })\n<\/pre><\/div>\n\n\n\n<p>Remember that <code>post()<\/code> returns the <code>jqXHR<\/code> object? We can save that as a variable as well and call <code>done() <\/code>on it to unpack the response and deal with it as we choose on our client side.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>$(document).ready(() =&gt; {\n    $('#new-recipe').submit((e) =&gt; {\n      e.preventDefault();\n      var values = $(this).serialize();\n      var posting = $.post('\/recipes', values);\n      posting.done( (data) =&gt; {\n        var recipe = data;\n        $('.recipes').text(recipe[&quot;name&quot;]);\n        $('.recipes').text(recipe[&quot;ingredients&quot;]);\n      })\n    })\n  })\n<\/pre><\/div>\n\n\n\n<p>After receiving the data and storing it in a more legible variable of <code>recipe<\/code>, we can access the name and ingredient attributes. For the sake of example, we inserted these attributes into a <code>&lt;div&gt;<\/code> with a class of <code>recipes<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"243\" height=\"219\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-11-at-10.22.38-PM.jpg\" alt=\"\" class=\"wp-image-25998\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-11-at-10.22.38-PM.jpg 243w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-11-at-10.22.38-PM-20x18-1.jpg 20w\" sizes=\"auto, (max-width: 243px) 100vw, 243px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>We\u2019ve covered a lot of ground here! Before we celebrate learning about post(), let\u2019s quickly recap what we\u2019ve learned.&nbsp;<br><\/p>\n\n\n\n<p>A common use for <code>post()<\/code> is inside of <code>.submit()<\/code> as a callback function. Since <code>.submit()<\/code> is called on the form itself, we can use the JavaScript <code>this<\/code> keyword to refer to all the data in the form and <code>serialize() <\/code>it. After we store the serialized data into a variable, often called values, we can send these values to our destination URL using <code>post()<\/code>.&nbsp;<br><\/p>\n\n\n\n<p>It\u2019s a good habit to store the <code>jqXHR<\/code> object returned by <code>post() <\/code>in a variable commonly called <code>posting<\/code>. From here we use the <code>handy done()<\/code> method on our posting variable, and now we have access to the data the server responded back with. It\u2019s now up to you on how you display the data to your user.&nbsp;<br><\/p>\n\n\n\n<p>Take a moment to congratulate yourself on tackling the complex process of <code>post()<\/code>! If you\u2019re at this stage of building your own app, remember that errors happen. Stay calm and debug!&nbsp;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"When building a web app, it is inevitable that we will have to create something from data a user inputs. This could be creating a new user account when someone submits their information through a sign up form, or creating a new recipe from your awesome new recipe organizer app.&nbsp; Going from user data in&hellip;","protected":false},"author":104,"featured_media":25999,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-25995","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-javascript"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"JavaScript","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Make a jQuery post() Request | Career Karma<\/title>\n<meta name=\"description\" content=\"The jQuery post() request is responsible for sending data from a screen to a server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/jquery-post\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Make a jQuery post() Request\" \/>\n<meta property=\"og:description\" content=\"The jQuery post() request is responsible for sending data from a screen to a server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/jquery-post\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-23T09:37:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-09T14:26:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/photo-1489875347897-49f64b51c1f8.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ryan Manchester\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ryan Manchester\" \/>\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:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/\"},\"author\":{\"name\":\"Ryan Manchester\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/92fd52a503f77fc058ec2d0666da9bd5\"},\"headline\":\"How to Make a jQuery post() Request\",\"datePublished\":\"2020-11-23T09:37:17+00:00\",\"dateModified\":\"2021-02-09T14:26:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/\"},\"wordCount\":947,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/photo-1489875347897-49f64b51c1f8.jpeg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/\",\"name\":\"How to Make a jQuery post() Request | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/photo-1489875347897-49f64b51c1f8.jpeg\",\"datePublished\":\"2020-11-23T09:37:17+00:00\",\"dateModified\":\"2021-02-09T14:26:06+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/92fd52a503f77fc058ec2d0666da9bd5\"},\"description\":\"The jQuery post() request is responsible for sending data from a screen to a server.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/photo-1489875347897-49f64b51c1f8.jpeg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/photo-1489875347897-49f64b51c1f8.jpeg\",\"width\":1200,\"height\":800},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/jquery-post\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Make a jQuery post() Request\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/92fd52a503f77fc058ec2d0666da9bd5\",\"name\":\"Ryan Manchester\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/ryan-manchester-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/ryan-manchester-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/ryan-manchester-150x150.jpg\",\"caption\":\"Ryan Manchester\"},\"description\":\"Ryan is a technical writer at Career Karma, where he covers programming languages, technology, and web development. The Texas native earned his Bachelor's of Music Composition from the University of North Texas. Ryan is currently pursuing further education in web development, aiming to graduate from Flatiron School with a certification in full stack web development. Since joining the Career Karma team in November 2020, Ryan has used his expertise to cover topics like React and Ruby on Rails.\",\"sameAs\":[\"http:\\\/\\\/www.ryanmanchester.info\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ryan-manchester-6537a630\\\/\"],\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/ryan-manchester\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Make a jQuery post() Request | Career Karma","description":"The jQuery post() request is responsible for sending data from a screen to a server.","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:\/\/careerkarma.com\/blog\/jquery-post\/","og_locale":"en_US","og_type":"article","og_title":"How to Make a jQuery post() Request","og_description":"The jQuery post() request is responsible for sending data from a screen to a server.","og_url":"https:\/\/careerkarma.com\/blog\/jquery-post\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-11-23T09:37:17+00:00","article_modified_time":"2021-02-09T14:26:06+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/photo-1489875347897-49f64b51c1f8.jpeg","type":"image\/jpeg"}],"author":"Ryan Manchester","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Ryan Manchester","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/"},"author":{"name":"Ryan Manchester","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/92fd52a503f77fc058ec2d0666da9bd5"},"headline":"How to Make a jQuery post() Request","datePublished":"2020-11-23T09:37:17+00:00","dateModified":"2021-02-09T14:26:06+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/"},"wordCount":947,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/photo-1489875347897-49f64b51c1f8.jpeg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/jquery-post\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/","url":"https:\/\/careerkarma.com\/blog\/jquery-post\/","name":"How to Make a jQuery post() Request | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/photo-1489875347897-49f64b51c1f8.jpeg","datePublished":"2020-11-23T09:37:17+00:00","dateModified":"2021-02-09T14:26:06+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/92fd52a503f77fc058ec2d0666da9bd5"},"description":"The jQuery post() request is responsible for sending data from a screen to a server.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/jquery-post\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/photo-1489875347897-49f64b51c1f8.jpeg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/photo-1489875347897-49f64b51c1f8.jpeg","width":1200,"height":800},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/jquery-post\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/careerkarma.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"How to Make a jQuery post() Request"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/92fd52a503f77fc058ec2d0666da9bd5","name":"Ryan Manchester","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/12\/ryan-manchester-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/12\/ryan-manchester-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/12\/ryan-manchester-150x150.jpg","caption":"Ryan Manchester"},"description":"Ryan is a technical writer at Career Karma, where he covers programming languages, technology, and web development. The Texas native earned his Bachelor's of Music Composition from the University of North Texas. Ryan is currently pursuing further education in web development, aiming to graduate from Flatiron School with a certification in full stack web development. Since joining the Career Karma team in November 2020, Ryan has used his expertise to cover topics like React and Ruby on Rails.","sameAs":["http:\/\/www.ryanmanchester.info\/","https:\/\/www.linkedin.com\/in\/ryan-manchester-6537a630\/"],"url":"https:\/\/careerkarma.com\/blog\/author\/ryan-manchester\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/25995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/104"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=25995"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/25995\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/25999"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=25995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=25995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=25995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}