From 8824afb494e5398bc0efcf5f7eb78782096fc90c Mon Sep 17 00:00:00 2001 From: A1lo Date: Fri, 18 Mar 2022 21:53:46 +0800 Subject: Replace marco `anch` with `` tag for `zh-CN` (#4668) * replace anch with tag `` * auto replace anch with scripts * fix: resolve some incorrect anchors * replace anch with markdown link in markdown files * sync with english version for `Properties` * fix: resolve some incorrect anchors * using `Specifications` marco to replace `` * fix: resolve some incorrect anchors * remove the `noteCard` and add a `h2` head * fix: resolve some incorrect anchors * remove the duplicated content * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * revert the content change and replace anch * revert the content change and replace anch * revert the content chang * fix: correct the `href` * revert content changes and replace the anch * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors --- files/zh-cn/web/api/fetch_api/using_fetch/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/zh-cn/web/api/fetch_api/using_fetch') diff --git a/files/zh-cn/web/api/fetch_api/using_fetch/index.md b/files/zh-cn/web/api/fetch_api/using_fetch/index.md index 165b290a82..b2833592a6 100644 --- a/files/zh-cn/web/api/fetch_api/using_fetch/index.md +++ b/files/zh-cn/web/api/fetch_api/using_fetch/index.md @@ -36,7 +36,7 @@ fetch('http://example.com/movies.json') 当然它只是一个 HTTP 响应,而不是真的 JSON。为了获取JSON的内容,我们需要使用 {{domxref("Response.json()", "json()")}} 方法(该方法返回一个将响应 body 解析成 JSON 的 promise)。 -> **备注:** {{anch("Body")}} 还有其他相似的方法,用于获取其他类型的内容。 +> **备注:** [Body](#Body) 还有其他相似的方法,用于获取其他类型的内容。 最好使用符合[内容安全策略 (CSP)](/zh-CN/docs/Web/HTTP/Headers/Content-Security-Policy)的链接而不是使用直接指向资源地址的方式来进行 fetch 的请求。 @@ -320,7 +320,7 @@ console.log(myHeaders.get('X-Custom-Header')); // null 虽然一些操作只能在 {{domxref("Service_Worker_API","ServiceWorkers")}} 中使用,但是它提供了更方便的操作 Headers 的 API。 -如果使用了一个不合法的 HTTP Header 属性名,那么 Headers 的方法通常都抛出 TypeError 异常。如果不小心写入了一个不可写的属性({{anch("Guard", "见下方")}}),也会抛出一个 TypeError 异常。除此以外的情况,失败了并不抛出异常。例如: +如果使用了一个不合法的 HTTP Header 属性名,那么 Headers 的方法通常都抛出 TypeError 异常。如果不小心写入了一个不可写的属性([见下方](#Guard)),也会抛出一个 TypeError 异常。除此以外的情况,失败了并不抛出异常。例如: ```js const myResponse = Response.error(); -- cgit v1.2.3-54-g00ecf