docs: 联网搜索服务架构方案全套(plan-final/design-arch/选型决策/整合导览/MCP文档/部署预设/联调手册) bench: 5 方案 + 代理 + 站点矩阵本机实测工程(无密钥) 部署目标:primary mgr1 先行测试(待批准后执行)
319 lines
No EOL
16 KiB
Text
319 lines
No EOL
16 KiB
Text
|
|
<!doctype html>
|
|
<html
|
|
lang="en-US"
|
|
data-theme="light dark"
|
|
data-renderer="Doc"
|
|
|
|
|
|
>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0"
|
|
/>
|
|
<title>Fetch API - Web APIs | MDN</title>
|
|
|
|
<script>try {
|
|
document.documentElement.dataset.theme =
|
|
localStorage.getItem("theme") || "light dark";
|
|
} catch (error) {
|
|
console.warn("Unable to set theme", error);
|
|
}
|
|
|
|
try {
|
|
if (localStorage.getItem("nop") === "yes") {
|
|
document.documentElement.dataset["nop"] = "yes";
|
|
}
|
|
} catch (error) {
|
|
console.warn("Unable to set nop", error);
|
|
}
|
|
</script>
|
|
<link rel="stylesheet" href="/static/client/styles-global.afc26587d4c0ce70.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/270.66bae6059a1c23f9.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-reference-layout.632d2f3884f10ca3.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/9228.84e610e6bb0bf33e.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-content-section.1eb240d1720d8ac3.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-heading-anchor.0eec5185ab9425b7.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-reference-toc.9b9bd019efd16b86.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-article-footer.81ae18c89fc527dc.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-left-sidebar.46e37af4d0b5c883.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-page-layout.5a4354f33e894319.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-a11y-menu.5796ee87cb69f93f.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-navigation.c3ebf384e65df345.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-logo.aea5ff6edf1b9cfb.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-menu.e2c5c8a53a8854c2.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-breadcrumbs-bar.9a51a3c76a6231d0.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-breadcrumbs.87eb742f4e711dc3.css" fetchpriority="high" /><link rel="stylesheet" href="/static/client/styles-footer.66072dd619a4ef50.css" fetchpriority="high" />
|
|
<link
|
|
rel="preload"
|
|
href="/static/client/jetbrains-mono-latin.119994ed445212c7.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous"
|
|
fetchpriority="low"
|
|
/><link
|
|
rel="preload"
|
|
href="/static/client/inter-latin.9a3b1bc220d426ef.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous"
|
|
fetchpriority="low"
|
|
/>
|
|
|
|
<script src="/static/client/runtime.7d6ffb41b253875f.js" type="module"></script><script src="/static/client/5909.489e266d049aa182.js" type="module"></script><script src="/static/client/4585.c85d1ccd65a081a6.js" type="module"></script><script src="/static/client/index.4e6754932187eb64.js" type="module"></script>
|
|
|
|
<link
|
|
rel="icon"
|
|
sizes="32x32"
|
|
href="https://developer.mozilla.org/favicon.ico"
|
|
/>
|
|
<link
|
|
rel="icon"
|
|
type="image/svg+xml"
|
|
href="https://developer.mozilla.org/favicon.svg"
|
|
/>
|
|
<meta name="description" content="The Fetch API provides an interface for fetching resources (including across the network). It is a more powerful and flexible replacement for XMLHttpRequest." /><meta name="og:url" content="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API" /><meta name="og:title" content="Fetch API - Web APIs | MDN" /><meta name="og:locale" content="en_US" /><meta name="og:description" content="The Fetch API provides an interface for fetching resources (including across the network). It is a more powerful and flexible replacement for XMLHttpRequest." /><meta name="og:image" content="https://developer.mozilla.org/mdn-social-image.46ac2375.png" /><meta name="og:image:type" content="image/png" /><meta name="og:image:height" content="1024" /><meta name="og:image:width" content="1024" /><meta name="og:image:alt" content="The MDN logo" /><meta name="og:site_name" content="MDN Web Docs" /><meta name="twitter:card" content="summary" /><meta name="twitter:creator" content="MozDevNet" />
|
|
<link
|
|
rel="canonical"
|
|
href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API"
|
|
/>
|
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
<link rel="manifest" href="/manifest.json" />
|
|
<link
|
|
rel="search"
|
|
type="application/opensearchdescription+xml"
|
|
href="/opensearch.xml?locale=en-US"
|
|
title="MDN"
|
|
/>
|
|
<link
|
|
rel="alternate"
|
|
type="application/rss+xml"
|
|
title="MDN Blog RSS Feed"
|
|
href="https://developer.mozilla.org/en-US/blog/rss.xml"
|
|
/>
|
|
</head>
|
|
|
|
<body class="page-layout">
|
|
<ul class="a11y-menu">
|
|
<li>
|
|
<a href="#content" data-glean-id="a11y_menu: click #content"
|
|
>Skip to main content</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="#search" data-glean-id="a11y_menu: click #search"
|
|
>Skip to search</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
<div class="page-layout__banner" data-scheme="">
|
|
<mdn-placement-top></mdn-placement-top>
|
|
</div>
|
|
<header class="page-layout__header">
|
|
|
|
<nav class="navigation" data-scheme="" data-open="false">
|
|
<div class="navigation__logo">
|
|
<a href="/en-US/" class="logo">
|
|
<svg
|
|
class="logo__image"
|
|
width="83"
|
|
height="24"
|
|
viewBox="0 0 83 24"
|
|
role="img"
|
|
>
|
|
<title>MDN</title>
|
|
<path
|
|
class="logo__letter"
|
|
d="M9.4 0 2.81 21.17H.12L6.69 0H9.4Zm2.38 0v21.17H9.4V0h2.4Zm9.27 0-6.56 21.17H11.8L18.36 0h2.69Zm2.39 0v21.17h-2.4V0h2.4Z"
|
|
/>
|
|
<path
|
|
class="logo__text"
|
|
d="M45.55 16.83h-3.93v-1.27h.87v-3.63c0-.85-.16-1.45-.48-1.82a1.65 1.65 0 0 0-1.3-.52c-.74 0-1.3.25-1.66.78a2.98 2.98 0 0 0-.58 1.58v3.59h1.38v1.26h-3.93v-1.26h.87v-3.6c0-.88-.16-1.48-.48-1.83a1.7 1.7 0 0 0-1.29-.52 1.93 1.93 0 0 0-1.65.75 2.85 2.85 0 0 0-.58 1.6v3.62h1.59v1.27h-4.64v-1.27h1.37V9.75h-1.4V8.46h3.08v1.47c.28-.48.62-.87 1.08-1.2a3 3 0 0 1 1.68-.45c.67 0 1.22.16 1.73.48.5.32.85.8 1.03 1.47.25-.57.62-1.03 1.13-1.4.5-.37 1.1-.55 1.81-.55.8 0 1.5.25 2.05.75.55.51.85 1.3.85 2.35v4.18h1.4v1.27Zm9.77 0H52.3v-1.66c-.27.51-.66.95-1.13 1.29-.56.4-1.23.59-1.9.55-1.11 0-2-.37-2.67-1.12a4.41 4.41 0 0 1-1-3.06c0-1.15.3-2.2.93-3.15.6-.94 1.58-1.43 2.94-1.43 1.36 0 2.25.5 2.83 1.5V5.22h-2V3.93h3.63v11.63h1.38v1.27Zm-3.06-3.86v-1.02a2.28 2.28 0 0 0-.73-1.67 2.4 2.4 0 0 0-1.66-.65 2.18 2.18 0 0 0-1.88.9 3.63 3.63 0 0 0-.65 2.2c0 .95.23 1.68.7 2.19.45.5 1.03.76 1.7.76.73 0 1.33-.3 1.79-.88.48-.6.71-1.21.73-1.83Zm14.14 3.86h-4.43v-1.27h1.37v-3.63c0-.85-.16-1.45-.5-1.82a1.68 1.68 0 0 0-1.31-.52c-.71 0-1.29.23-1.7.69a2.52 2.52 0 0 0-.67 1.6v3.66h1.38v1.26H56.1v-1.26h1.38v-5.8h-1.42V8.47h3.12V9.9c.6-1.06 1.57-1.6 2.92-1.6.83 0 1.54.26 2.12.77.57.5.85 1.28.85 2.34v4.19h1.38v1.24h-.05Z"
|
|
/>
|
|
<path class="logo__cursor" d="M67.71 21.98H83V24H67.71v-2.02Z" />
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
<div class="navigation__search" data-view="mobile">
|
|
<mdn-search-button><template shadowroot="open" shadowrootmode="open"><style>.mdn-search-button{align-items:center;background-color:var(--color-background-page);border:1px solid var(--color-border-primary);border-radius:var(--radius-full);color:var(--color-text-primary);cursor:pointer;display:flex;justify-content:space-between;margin:0;padding:.25rem .25rem .25rem .75rem;width:5rem}.mdn-search-button:hover{background-color:var(--color-background-secondary)}.mdn-search-button:before{content:"";height:18px;width:15px;--csstools-light-dark-toggle-95231fd5-0:var(--csstools-color-scheme--light) var(--color-blue-80);border-bottom:2px solid var(--csstools-light-dark-toggle-95231fd5-0,var(--color-blue-50))}@supports (color:light-dark(red,red)){.mdn-search-button:before{border-bottom:2px solid light-dark(var(--color-blue-50),var(--color-blue-80))}}</style><!--lit-part PwhADO+m7/M=--><!--lit-node 0--><button
|
|
class="mdn-search-button"
|
|
title="Search the site"
|
|
|
|
data-glean-id="quick-search-open: menu"
|
|
>
|
|
<!--lit-part ijtgkDNyZhc=--><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/></svg><!--/lit-part-->
|
|
</button><!--/lit-part--></template></mdn-search-button>
|
|
</div>
|
|
<button
|
|
class="navigation__button"
|
|
type="button"
|
|
aria-expanded="false"
|
|
aria-controls="navigation__popup"
|
|
aria-label="Toggle navigation"
|
|
></button>
|
|
<div class="navigation__popup" id="navigation__popup">
|
|
<div class="navigation__menu">
|
|
<nav class="menu">
|
|
<div class="menu__tab" data-section="html">
|
|
<mdn-dropdown
|
|
|
|
data-glean-toggle-open="menu_toggle: html"><template shadowroot="open" shadowrootmode="open"><style>:host{display:contents}:host(:not([loaded],:focus-within)) slot[name=dropdown]{display:none}</style><!--lit-part NrjKVwpqTpA=-->
|
|
<!--lit-node 0--><slot name="button" ></slot>
|
|
<!--lit-node 1--><slot name="dropdown" ></slot>
|
|
<!--/lit-part--></template>
|
|
<button
|
|
class="menu__tab-button"
|
|
type="button"
|
|
slot="button"
|
|
>
|
|
<span class="menu__tab-label"
|
|
>HTML</span
|
|
>
|
|
</button>
|
|
<div class="menu__panel" slot="dropdown">
|
|
<p class="menu__panel-title">
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML"
|
|
|
|
|
|
data-glean-id="menu_click_menu: html -> /en-US/docs/Web/HTML"
|
|
>HTML: Markup language</a
|
|
>
|
|
</p>
|
|
<div class="menu__panel-content">
|
|
<dl>
|
|
<dt>HTML reference</dt>
|
|
<dd><ul>
|
|
<li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML/Reference/Elements"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/HTML/Reference/Elements"
|
|
>Elements</a
|
|
>
|
|
</li><li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML/Reference/Global_attributes"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/HTML/Reference/Global_attributes"
|
|
>Global attributes</a
|
|
>
|
|
</li><li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML/Reference/Attributes"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/HTML/Reference/Attributes"
|
|
>Attributes</a
|
|
>
|
|
</li><li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML/Reference"
|
|
aria-label="See all HTML references"
|
|
title="See all HTML references"
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/HTML/Reference"
|
|
>See all…</a
|
|
>
|
|
</li>
|
|
</ul></dd>
|
|
</dl><dl>
|
|
<dt>HTML guides</dt>
|
|
<dd><ul>
|
|
<li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML/Guides/Responsive_images"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/HTML/Guides/Responsive_images"
|
|
>Responsive images</a
|
|
>
|
|
</li><li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML/Guides/Cheatsheet"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/HTML/Guides/Cheatsheet"
|
|
>HTML cheatsheet</a
|
|
>
|
|
</li><li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML/Guides/Date_and_time_formats"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/HTML/Guides/Date_and_time_formats"
|
|
>Date & time formats</a
|
|
>
|
|
</li><li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/HTML/Guides"
|
|
aria-label="See all HTML guides"
|
|
title="See all HTML guides"
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/HTML/Guides"
|
|
>See all…</a
|
|
>
|
|
</li>
|
|
</ul></dd>
|
|
</dl><dl>
|
|
<dt>Markup languages</dt>
|
|
<dd><ul>
|
|
<li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/SVG"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/SVG"
|
|
>SVG</a
|
|
>
|
|
</li><li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/MathML"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/MathML"
|
|
>MathML</a
|
|
>
|
|
</li><li>
|
|
<a
|
|
|
|
href="/en-US/docs/Web/XML"
|
|
|
|
|
|
data-glean-id="menu_click_submenu: html -> /en-US/docs/Web/XML"
|
|
>XML</a
|
|
>
|
|
</li>
|
|
</ul></dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</mdn-dropdown>
|
|
</div><div class="menu__tab" data-section="css">
|
|
<mdn-dropdown
|
|
|
|
data-glean-toggle-open="menu_toggle: css"><template shadowroot="open" shadowrootmode="open"><style>:host{display:contents}:host(:not([loaded],:focus-within)) slot[name=dropdown]{display:none}</style><!--lit-part NrjKVwpqTpA=-->
|
|
<!--lit-node 0--><slot name="button" ></slot>
|
|
<!--lit-node 1--><slot name="dropdown" ></slot>
|
|
<!--/lit-part--></template>
|
|
<button
|
|
class="menu__tab-button"
|
|
type="button"
|
|
slot="button"
|
|
>
|
|
<span class="menu__tab-label"
|
|
>CSS</span
|
|
>
|
|
</button>
|
|
<div class="menu__panel" slot="dropdown">
|
|
<p class="menu__panel-title">
|
|
<a
|
|
|
|
href="/en-US/docs/Web/CSS"
|
|
|
|
|
|
data-glean-id="menu_click_menu: css -> /en-US/docs/Web/CSS"
|
|
>CSS: Styling language</a
|
|
>
|
|
</p>
|
|
<div class="menu__panel-content">
|
|
<dl>
|
|
<dt>CSS referenc |