{"id":159971,"date":"2024-05-08T13:20:46","date_gmt":"2024-05-08T05:20:46","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/159971.html"},"modified":"2024-05-08T13:20:49","modified_gmt":"2024-05-08T05:20:49","slug":"%e5%89%8d%e7%ab%af-javascript-%e7%a8%8b%e5%ba%8f%e4%b8%ad%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-await-%e5%ae%9e%e7%8e%b0%e5%bc%82%e6%ad%a5%e8%b0%83%e7%94%a8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/159971.html","title":{"rendered":"\u524d\u7aef JavaScript \u7a0b\u5e8f\u4e2d\u5982\u4f55\u4f7f\u7528 await \u5b9e\u73b0\u5f02\u6b65\u8c03\u7528"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26222542\/aee68d6a-feda-48e5-bf00-dac37bf31406.webp\" alt=\"\u524d\u7aef JavaScript \u7a0b\u5e8f\u4e2d\u5982\u4f55\u4f7f\u7528 await \u5b9e\u73b0\u5f02\u6b65\u8c03\u7528\" \/><\/p>\n<p><p>\u5728\u524d\u7aef JavaScript \u7a0b\u5e8f\u4e2d\u4f7f\u7528 <code>aw<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t<\/code> \u5b9e\u73b0\u5f02\u6b65\u8c03\u7528\uff0c\u9996\u5148\u9700\u8981\u7406\u89e3\u5176\u5de5\u4f5c\u539f\u7406\u548c\u9002\u7528\u573a\u666f\u3002<code>await<\/code> \u64cd\u4f5c\u7b26\u7528\u4e8e\u7b49\u5f85\u4e00\u4e2a <code>Promise<\/code> \u89e3\u51b3\u6216\u62d2\u7edd\uff0c\u5b83\u53ea\u80fd\u5728\u5f02\u6b65\u51fd\u6570<code>async<\/code>\u5185\u90e8\u4f7f\u7528\u3002\u5176\u6838\u5fc3\u4f18\u52bf\u5305\u62ec\uff1a<strong>\u7b80\u5316\u5f02\u6b65\u64cd\u4f5c\u7684\u4ee3\u7801\u3001\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u3001\u4f7f\u5f02\u6b65\u4ee3\u7801\u770b\u8d77\u6765\u66f4\u50cf\u540c\u6b65\u4ee3\u7801<\/strong>\u3002<strong>\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c<code>await<\/code> \u6700\u5927\u7684\u8d21\u732e\u5728\u4e8e\u7b80\u5316\u590d\u6742\u7684\u5f02\u6b65\u64cd\u4f5c\u6d41\u7a0b<\/strong>\uff0c\u8ba9\u4ee3\u7801\u66f4\u52a0\u76f4\u89c2\u6613\u61c2\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u7406\u89e3 ASYNC \u548c AWAIT<\/h3>\n<\/p>\n<p><p><code>async<\/code> \u51fd\u6570\u662f\u5f02\u6b65\u51fd\u6570\u7684\u7b80\u5199\uff0c\u5b83\u901a\u8fc7\u5c06\u51fd\u6570\u58f0\u660e\u4e3a <code>async<\/code> \u7c7b\u578b\uff0c\u6765\u6807\u660e\u51fd\u6570\u5185\u90e8\u53ef\u80fd\u4f1a\u8fdb\u884c\u5f02\u6b65\u64cd\u4f5c\u3002<code>async<\/code> \u51fd\u6570\u5185\u90e8\u53ef\u4ee5\u4f7f\u7528 <code>await<\/code> \u64cd\u4f5c\u7b26\u3002\u91cd\u8981\u7684\u662f\uff0c<strong><code>async<\/code> \u51fd\u6570\u603b\u662f\u8fd4\u56de\u4e00\u4e2a <code>Promise<\/code> \u5bf9\u8c61<\/strong>\uff0c\u8fd9\u610f\u5473\u7740\u60a8\u53ef\u4ee5\u4f7f\u7528 <code>.then()<\/code> \u548c <code>.catch()<\/code> \u65b9\u6cd5\u6765\u5904\u7406\u7ed3\u679c\u548c\u6355\u83b7\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684 <code>async<\/code> \u51fd\u6570\uff0c\u5e76\u5728\u5176\u4e2d\u4f7f\u7528 <code>await<\/code>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">async function fetchData(url) {<\/p>\n<p>  let response = await fetch(url);<\/p>\n<p>  let data = await response.json();<\/p>\n<p>  return data;<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u51fd\u6570\u9488\u5bf9\u7ed9\u5b9a\u7684 URL \u6267\u884c\u4e00\u4e2a\u7f51\u7edc\u8bf7\u6c42\uff0c\u5e76\u7b49\u5f85\u8bf7\u6c42\u5b8c\u6210\u3002\u4e4b\u540e\uff0c\u5b83\u5c06\u54cd\u5e94\u89e3\u6790\u4e3a JSON\uff0c\u5e76\u8fd4\u56de\u89e3\u6790\u540e\u7684\u6570\u636e\u3002\u6574\u4e2a\u8fc7\u7a0b\u662f\u5f02\u6b65\u7684\uff0c\u4f46\u662f\u4f7f\u7528 <code>await<\/code> \u8ba9\u5b83\u770b\u8d77\u6765\u5c31\u50cf\u662f\u987a\u5e8f\u6267\u884c\u7684\u4e00\u6837\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u9519\u8bef\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528 <code>await<\/code> \u65f6\uff0c\u9519\u8bef\u5904\u7406\u662f\u975e\u5e38\u5173\u952e\u7684\u4e00\u73af\u3002\u7531\u4e8e <code>await<\/code> \u4f1a\u6682\u505c\u4ee3\u7801\u7684\u6267\u884c\uff0c\u76f4\u5230 Promise \u89e3\u51b3\uff0c\u6240\u4ee5\u9700\u8981\u59a5\u5584\u5904\u7406\u53ef\u80fd\u53d1\u751f\u7684\u5f02\u5e38\uff0c\u4ee5\u907f\u514d\u7a0b\u5e8f\u610f\u5916\u5d29\u6e83\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">async function fetchWithErrorHandling(url) {<\/p>\n<p>  try {<\/p>\n<p>    let response = await fetch(url);<\/p>\n<p>    let data = await response.json();<\/p>\n<p>    return data;<\/p>\n<p>  } catch (error) {<\/p>\n<p>    console.error(&#039;Fetching data failed&#039;, error);<\/p>\n<p>  }<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\u901a\u8fc7 <code>try...catch<\/code> \u8bed\u53e5\u6765\u6355\u6349\u4f7f\u7528 <code>await<\/code> \u65f6\u53ef\u80fd\u53d1\u751f\u7684\u9519\u8bef\u3002<strong>\u8fd9\u79cd\u9519\u8bef\u5904\u7406\u65b9\u5f0f\u786e\u4fdd\u4e86\u5373\u4fbf\u8fdc\u7a0b\u8bf7\u6c42\u51fa\u73b0\u95ee\u9898\uff0c\u6211\u4eec\u7684\u7a0b\u5e8f\u4e5f\u80fd\u4f18\u96c5\u5730\u5904\u7406\u5f02\u5e38<\/strong>\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4e32\u884c\u4e0e\u5e76\u884c<\/h3>\n<\/p>\n<p><p><code>await<\/code> \u53ef\u4ee5\u5728\u591a\u4e2a\u5f02\u6b65\u64cd\u4f5c\u4e2d\u4f7f\u7528\uff0c\u8fd9\u6d89\u53ca\u5230\u5f02\u6b65\u4efb\u52a1\u7684\u4e32\u884c\u548c\u5e76\u884c\u6267\u884c\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u4e32\u884c\u6267\u884c<\/strong>\uff1a\u4e00\u4e2a <code>await<\/code> \u64cd\u4f5c\u5b8c\u6210\u4e4b\u540e\uff0c\u518d\u6267\u884c\u4e0b\u4e00\u4e2a <code>await<\/code>\u3002\u8fd9\u6709\u52a9\u4e8e\u67d0\u4e9b\u4f9d\u8d56\u524d\u4e00\u4e2a\u5f02\u6b65\u64cd\u4f5c\u7ed3\u679c\u7684\u60c5\u51b5\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-javascript\">async function serialTasks() {<\/p>\n<p>  const result1 = await doFirstTask();<\/p>\n<p>  const result2 = await doSecondTask(result1); \/\/ \u4f9d\u8d56\u7b2c\u4e00\u4e2a\u4efb\u52a1\u7684\u7ed3\u679c<\/p>\n<p>  return [result1, result2];<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ul>\n<li><strong>\u5e76\u884c\u6267\u884c<\/strong>\uff1a\u5f53\u591a\u4e2a\u5f02\u6b65\u64cd\u4f5c\u4e92\u4e0d\u4f9d\u8d56\u65f6\uff0c\u53ef\u4ee5\u5e76\u884c\u6267\u884c\u4ee5\u63d0\u9ad8\u6548\u7387\u3002\u4f7f\u7528 <code>Promise.all()<\/code> \u6765\u5e76\u884c\u6267\u884c\u591a\u4e2a <code>await<\/code>\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-javascript\">async function parallelTasks() {<\/p>\n<p>  const [result1, result2] = await Promise.all([doFirstTask(), doSecondTask()]);<\/p>\n<p>  return [result1, result2];<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u901a\u8fc7\u540c\u65f6\u542f\u52a8\u591a\u4e2a\u5f02\u6b65\u4efb\u52a1\u5e76\u4f7f\u7528 <code>Promise.all()<\/code> \u7b49\u5f85\u5b83\u4eec\u5168\u90e8\u5b8c\u6210\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u5347\u5e94\u7528\u6027\u80fd\u3002<\/strong><\/p>\n<\/p>\n<p><h3>\u56db\u3001ASYNC\/AWAIT \u4e0e PROMISES<\/h3>\n<\/p>\n<p><p>\u867d\u7136 <code>async\/await<\/code> \u5728\u8bed\u6cd5\u4e0a\u66f4\u52a0\u6e05\u6670\u6613\u61c2\uff0c\u4f46\u5b83\u5efa\u7acb\u5728 <code>Promises<\/code> \u4e4b\u4e0a\u3002\u4e86\u89e3 <code>Promises<\/code> \u672c\u8eab\u5982\u4f55\u5de5\u4f5c\uff0c\u5bf9\u4e8e\u6df1\u5165\u7406\u89e3 <code>async\/await<\/code> \u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><p><code>Promises<\/code> \u63d0\u4f9b\u4e86\u4e00\u79cd\u5904\u7406\u5f02\u6b65\u64cd\u4f5c\u7684\u65b9\u6cd5\u3002\u6bcf\u4e2a <code>Promise<\/code> \u5728\u521b\u5efa\u65f6\u90fd\u5904\u4e8e\u5f85\u5b9a\uff08pending\uff09\u72b6\u6001\uff0c\u53ef\u80fd\u8fc7\u6e21\u5230\u5df2\u89e3\u51b3\uff08fulfilled\uff09\u6216\u5df2\u62d2\u7edd\uff08rejected\uff09\u72b6\u6001\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">function fetchWithPromise(url) {<\/p>\n<p>  return new Promise((resolve, reject) =&gt; {<\/p>\n<p>    fetch(url).then(response =&gt; {<\/p>\n<p>      if (response.ok) {<\/p>\n<p>        resolve(response.json());<\/p>\n<p>      } else {<\/p>\n<p>        reject(new Error(&#039;Failed to load&#039;));<\/p>\n<p>      }<\/p>\n<p>    }).catch(error =&gt; {<\/p>\n<p>      reject(error);<\/p>\n<p>    });<\/p>\n<p>  });<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u6bd4\u8f83\uff0c\u53ef\u4ee5\u770b\u51fa <code>async\/await<\/code> \u8ba9\u5904\u7406\u5f02\u6b65\u53d8\u5f97\u66f4\u52a0\u76f4\u89c2\u3002<strong><code>async\/await<\/code> \u4e0d\u662f\u53d6\u4ee3 <code>Promises<\/code> \u7684\u65b9\u6cd5\uff0c\u800c\u662f\u4e00\u4e2a\u5728 <code>Promises<\/code> \u4e0a\u5c42\u7684\u62bd\u8c61\uff0c\u7528\u4e8e\u7b80\u5316\u5f02\u6b65\u7f16\u7a0b\u7684\u590d\u6742\u6027\u3002<\/strong><\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u6700\u4f73\u5b9e\u8df5<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528 <code>await<\/code> \u65f6\uff0c\u6709\u51e0\u4e2a\u6700\u4f73\u5b9e\u8df5\u53ef\u4ee5\u5e2e\u52a9\u7f16\u5199\u9ad8\u6548\u3001\u6e05\u6670\u7684\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u4ec5\u5728\u5f02\u6b65\u64cd\u4f5c\u65f6\u4f7f\u7528 <code>await<\/code><\/strong>\uff1a\u4e0d\u5e94\u5728\u5e38\u89c4\u51fd\u6570\u4e2d\u4f7f\u7528 <code>await<\/code>\uff0c\u5426\u5219\u4f1a\u5bfc\u81f4\u4e0d\u5fc5\u8981\u7684\u6027\u80fd\u5f00\u9500\u3002<\/li>\n<li><strong>\u5408\u7406\u5229\u7528\u5e76\u884c\u6267\u884c<\/strong>\uff1a\u5bf9\u4e8e\u4e92\u4e0d\u4f9d\u8d56\u7684\u5f02\u6b65\u64cd\u4f5c\uff0c\u5e94\u5c3d\u91cf\u5e76\u884c\u5904\u7406\uff0c\u4ee5\u8282\u7701\u65f6\u95f4\u3002<\/li>\n<li><strong>\u5bf9\u9519\u8bef\u8fdb\u884c\u5904\u7406<\/strong>\uff1a\u5229\u7528 <code>try...catch<\/code> \u6216 <code>.catch()<\/code> \u65b9\u6cd5\u6765\u7ba1\u7406\u9519\u8bef\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002<\/li>\n<li><strong>\u907f\u514d\u8fc7\u591a\u7684\u5d4c\u5957<\/strong>\uff1a<code>async\/await<\/code> \u4f7f\u6211\u4eec\u80fd\u591f\u4ee5\u8fd1\u4e4e\u540c\u6b65\u7684\u65b9\u5f0f\u5199\u5f02\u6b65\u4ee3\u7801\uff0c\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u4ee3\u7801\u5d4c\u5957\u3002<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u4ecb\u7ecd\uff0c\u5e94\u8be5\u5df2\u7ecf\u5bf9\u5982\u4f55\u5728\u524d\u7aef JavaScript \u7a0b\u5e8f\u4e2d\u4f7f\u7528 <code>await<\/code> \u5b9e\u73b0\u5f02\u6b65\u8c03\u7528\u6709\u4e86\u8f83\u4e3a\u6df1\u5165\u7684\u7406\u89e3\u3002<code>await<\/code> \u63d0\u4f9b\u4e86\u4e00\u79cd\u4f18\u96c5\u7684\u65b9\u5f0f\u6765\u5904\u7406 JavaScript \u4e2d\u7684\u5f02\u6b65\u64cd\u4f5c\uff0c\u662f\u73b0\u4ee3\u524d\u7aef\u5f00\u53d1\u7684\u91cd\u8981\u6280\u5de7\u4e4b\u4e00\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5982\u4f55\u5728\u524d\u7aef JavaScript \u7a0b\u5e8f\u4e2d\u4f7f\u7528 await \u5b9e\u73b0\u5f02\u6b65\u8c03\u7528\uff1f<\/strong><\/p>\n<p>\u5728\u524d\u7aef JavaScript \u7a0b\u5e8f\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 async\/await \u6765\u5b9e\u73b0\u5f02\u6b65\u8c03\u7528\u3002\u9996\u5148\uff0c\u4f7f\u7528 async \u5173\u952e\u5b57\u5b9a\u4e49\u4e00\u4e2a\u5305\u542b\u5f02\u6b65\u64cd\u4f5c\u7684\u51fd\u6570\u3002\u7136\u540e\uff0c\u5728\u9700\u8981\u5f02\u6b65\u6267\u884c\u7684\u4ee3\u7801\u524d\u52a0\u4e0a await \u5173\u952e\u5b57\u3002\u8fd9\u6837\uff0c\u5f53\u8c03\u7528\u5305\u542b await \u7684\u51fd\u6570\u65f6\uff0cJavaScript \u5f15\u64ce\u4f1a\u6682\u505c\u6267\u884c\uff0c\u5e76\u7b49\u5f85\u5f02\u6b65\u64cd\u4f5c\u5b8c\u6210\u3002\u5728\u5f02\u6b65\u64cd\u4f5c\u5b8c\u6210\u540e\uff0c\u7a0b\u5e8f\u4f1a\u7ee7\u7eed\u6267\u884c\u3002<\/p>\n<p><strong>2. \u5728\u524d\u7aef JavaScript \u4e2d\uff0c\u4ec0\u4e48\u60c5\u51b5\u4e0b\u9700\u8981\u4f7f\u7528 await \u8fdb\u884c\u5f02\u6b65\u8c03\u7528\uff1f<\/strong><\/p>\n<p>\u5728\u524d\u7aef JavaScript \u7a0b\u5e8f\u4e2d\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\u9700\u8981\u4f7f\u7528 await \u8fdb\u884c\u5f02\u6b65\u8c03\u7528\u7684\u60c5\u51b5\u5305\u62ec\uff1a\u53d1\u9001 HTTP \u8bf7\u6c42\u83b7\u53d6\u6570\u636e\u3001\u6267\u884c\u5b9a\u65f6\u4efb\u52a1\u6216\u5ef6\u8fdf\u64cd\u4f5c\u3001\u5904\u7406\u5f02\u6b65\u56de\u8c03\u51fd\u6570\u7b49\u3002\u4f7f\u7528 await \u53ef\u4ee5\u7b80\u5316\u5f02\u6b65\u4ee3\u7801\u7684\u7f16\u5199\uff0c\u4f7f\u4ee3\u7801\u66f4\u6613\u8bfb\u3001\u6613\u7ef4\u62a4\u3002<\/p>\n<p><strong>3. \u5728\u524d\u7aef JavaScript \u4e2d\uff0c\u4f7f\u7528 await \u8fdb\u884c\u5f02\u6b65\u8c03\u7528\u65f6\u6709\u54ea\u4e9b\u6ce8\u610f\u4e8b\u9879\uff1f<\/strong><\/p>\n<p>\u5728\u4f7f\u7528 await \u8fdb\u884c\u5f02\u6b65\u8c03\u7528\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<ul>\n<li>\u5fc5\u987b\u5728\u5305\u542b async \u5173\u952e\u5b57\u7684\u51fd\u6570\u5185\u90e8\u4f7f\u7528 await \u8fdb\u884c\u5f02\u6b65\u8c03\u7528\u3002<\/li>\n<li>await \u540e\u9762\u5fc5\u987b\u8ddf\u7740\u4e00\u4e2a\u8fd4\u56de Promise \u7684\u8868\u8fbe\u5f0f\uff0c\u4f8b\u5982\u5f02\u6b65\u51fd\u6570\u8c03\u7528\u3001fetch \u8bf7\u6c42\u7b49\u3002<\/li>\n<li>\u4f7f\u7528 try\/catch \u5757\u6765\u5904\u7406\u5f02\u6b65\u8c03\u7528\u53ef\u80fd\u5f15\u53d1\u7684\u5f02\u5e38\u3002<\/li>\n<li>\u5728\u4f7f\u7528 await \u8fdb\u884c\u5f02\u6b65\u8c03\u7528\u65f6\uff0c\u51fd\u6570\u4f1a\u6682\u505c\u6267\u884c\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u9875\u9762\u51fa\u73b0\u201c\u5047\u6b7b\u201d\u72b6\u6001\uff0c\u56e0\u6b64\u9700\u8981\u5408\u7406\u63a7\u5236\u5f02\u6b65\u64cd\u4f5c\u7684\u6267\u884c\u65f6\u95f4\u3002<\/li>\n<li>\u6ce8\u610f\u5f02\u6b65\u8c03\u7528\u7684\u5148\u540e\u987a\u5e8f\uff0c\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6267\u884c\u6d41\u7a0b\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"\u5728\u524d\u7aef JavaScript \u7a0b\u5e8f\u4e2d\u4f7f\u7528 awAIt \u5b9e\u73b0\u5f02\u6b65\u8c03\u7528\uff0c\u9996\u5148\u9700\u8981\u7406\u89e3\u5176\u5de5\u4f5c\u539f\u7406\u548c\u9002\u7528\u573a\u666f\u3002awai [&hellip;]","protected":false},"author":3,"featured_media":159981,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/159971"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=159971"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/159971\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/159981"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=159971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=159971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=159971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}