diff options
author | A1lo <yin199909@aliyun.com> | 2022-03-18 21:53:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 21:53:46 +0800 |
commit | 8824afb494e5398bc0efcf5f7eb78782096fc90c (patch) | |
tree | 92fd44c01908cc7b39da131bcac6a0cae024bb6f /files/zh-cn/web/api/fetch_api/using_fetch | |
parent | e48f0a637c058b51a6268e0c2c384957e03d2b60 (diff) | |
download | translated-content-8824afb494e5398bc0efcf5f7eb78782096fc90c.tar.gz translated-content-8824afb494e5398bc0efcf5f7eb78782096fc90c.tar.bz2 translated-content-8824afb494e5398bc0efcf5f7eb78782096fc90c.zip |
Replace marco `anch` with `<a>` tag for `zh-CN` (#4668)
* replace anch with tag `<a>`
* 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 `<table>`
* 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
Diffstat (limited to 'files/zh-cn/web/api/fetch_api/using_fetch')
-rw-r--r-- | files/zh-cn/web/api/fetch_api/using_fetch/index.md | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |