{"id":8048,"date":"2021-08-17T12:45:21","date_gmt":"2021-08-17T12:45:21","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=8048"},"modified":"2022-04-13T16:30:44","modified_gmt":"2022-04-13T16:30:44","slug":"how-does-the-javascript-promise-work","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/","title":{"rendered":"How does the JavaScript Promise work?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Promise<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Promise is an object representing the eventual completion or failure of an asynchronous operation. A JavaScript Promise object contains both the producing code and calls to the consuming code. It can be used to deal with Asynchronous operations in JavaScript.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Promise State:-<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pending &#8211; Initial State, Not yet Fulfilled or Rejected<br>Fulfilled\/Resolved \u2013 Promise Completed<br>Rejected \u2013 Promise Failed<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How Promise works<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works.png\" alt=\"\" class=\"wp-image-8050\" width=\"827\" height=\"402\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works.png 553w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works-300x146.png 300w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>A pending promise can either be Resolved with a value or Rejected with a reason (error).<\/li><li>When either of these options happens, the associated handlers queued up by a promise&#8217;s then method are called.<\/li><li>A promise is said to be settled if it is either Resolved or Rejected, but not Pending.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Creating Promise<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Promise () \u2013 A Promise object is created using the new keyword and its constructor. This constructor takes a function, called the &#8220;executor function&#8221;, as its parameter. This function should take two functions as parameters. The first of these functions (resolve) is called when the asynchronous task completes successfully and returns the results of the task as a value. The second (reject) is called when the task fails and returns the reason for failure, which is typically an error object.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Syntax:- Promise (executor)<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/3e7af5aa79a5d7a87e3f2a9a5c422046.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\">A JavaScript Promise object contains both the producing code and calls to the consuming code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Function Returning a Promise<\/strong><\/h2>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/3a1622149d11b5cb7992e09699cfcab4.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>then( ) Method<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The then() method returns a Promise. It takes up to two arguments: callback functions for the success and failure cases of the Promise. As then the method returns a Promise so we can do method chaining.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Syntax:- then(onResolved, onRejected)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">onResolved &#8211; A Function called if the Promise is fulfilled. This function has one argument, the fulfillment value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">onRejected &#8211; A Function called if the Promise is rejected. This function has one argument, the rejection reason.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/5f3dff1255544e534673c129d0a72fed.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Promise<\/strong><\/h2>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/51a3a49dd2cfe1be5fc0cf437b652753.js\"><\/script>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/1b7e2b3d633315899cc0017a944b974b.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Chaining<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The then method returns a Promise which allows for method chaining. If the function passed as a handler to then returns a Promise, an equivalent Promise will be exposed to the subsequent then in the method chain.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/8ea687e432c326ee1092e97c37eb91b2.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>catch () Method<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>catch()<\/em> method returns a Promise and deals with rejected cases only. It behaves the same as calling <em>then(undefined, onRejected)<\/em>. In fact, calling <em>catch(onRejected)<\/em> internally calls <em>then(undefined, onRejected)<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The catch method is used for error handling in promise composition. Since it returns a Promise, it can be chained in the same way as its sister method, then()<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Syntax:- catch(callback)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Where the callback is a function called when the Promise is rejected. This function has one argument <em>error<\/em> \u2013 The rejection error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>catch () Method<\/strong><\/h2>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/ffcdec8b353af77dc76c124174aff7b2.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>finally () Method<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The finally() method returns a Promise. When the promise is settled, i.e either fulfilled or rejected, the specified callback function is executed. This provides a way for code to be run whether the promise was fulfilled successfully or rejected once the Promise has been dealt with.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This helps to avoid duplicating code in both the promise&#8217;s then() and catch() handlers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Syntax:- finally(callback)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>finally () Method<\/strong><\/h2>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/6313b37034386711f45503bcb708ca1f.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Chaining<\/strong><\/h2>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vijaypk376\/37d902b6b443559b020399056cb5d998.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>Promise A Promise is an object representing the eventual completion or failure of an asynchronous operation. A JavaScript Promise object [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[16],"tags":[5144,5095,4240,853,5296],"class_list":["post-8048","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-functions","tag-javascript","tag-method","tag-operation","tag-promises"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How does the JavaScript Promise work? - scmGalaxy<\/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.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How does the JavaScript Promise work? - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Promise A Promise is an object representing the eventual completion or failure of an asynchronous operation. A JavaScript Promise object [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-17T12:45:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-13T16:30:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works.png\" \/>\n<meta name=\"author\" content=\"rajeshkumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rajeshkumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/\"},\"author\":{\"name\":\"rajeshkumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"headline\":\"How does the JavaScript Promise work?\",\"datePublished\":\"2021-08-17T12:45:21+00:00\",\"dateModified\":\"2022-04-13T16:30:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/\"},\"wordCount\":501,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/how-promise-works.png\",\"keywords\":[\"functions\",\"Javascript\",\"Method\",\"Operation\",\"Promises\"],\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/\",\"name\":\"How does the JavaScript Promise work? - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/how-promise-works.png\",\"datePublished\":\"2021-08-17T12:45:21+00:00\",\"dateModified\":\"2022-04-13T16:30:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/how-promise-works.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/how-promise-works.png\",\"width\":553,\"height\":269},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-does-the-javascript-promise-work\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How does the JavaScript Promise work?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\",\"name\":\"rajeshkumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"caption\":\"rajeshkumar\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/rajeshkumar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How does the JavaScript Promise work? - scmGalaxy","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.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/","og_locale":"en_US","og_type":"article","og_title":"How does the JavaScript Promise work? - scmGalaxy","og_description":"Promise A Promise is an object representing the eventual completion or failure of an asynchronous operation. A JavaScript Promise object [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-17T12:45:21+00:00","article_modified_time":"2022-04-13T16:30:44+00:00","og_image":[{"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works.png","type":"","width":"","height":""}],"author":"rajeshkumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rajeshkumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/"},"author":{"name":"rajeshkumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"headline":"How does the JavaScript Promise work?","datePublished":"2021-08-17T12:45:21+00:00","dateModified":"2022-04-13T16:30:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/"},"wordCount":501,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works.png","keywords":["functions","Javascript","Method","Operation","Promises"],"articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/","name":"How does the JavaScript Promise work? - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works.png","datePublished":"2021-08-17T12:45:21+00:00","dateModified":"2022-04-13T16:30:44+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/how-promise-works.png","width":553,"height":269},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-does-the-javascript-promise-work\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"How does the JavaScript Promise work?"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361","name":"rajeshkumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","caption":"rajeshkumar"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/rajeshkumar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/8048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=8048"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/8048\/revisions"}],"predecessor-version":[{"id":8055,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/8048\/revisions\/8055"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=8048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=8048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=8048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}