You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
127 KiB
JavaScript

"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[6229],{4683:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>d,default:()=>x,frontMatter:()=>a,metadata:()=>o,toc:()=>p});var r=t(5893),s=t(1151),i=t(510),l=t(4866),c=t(5162);const a={id:"http",title:"19. \u8fdc\u7a0b\u8bf7\u6c42",sidebar_label:"19. \u8fdc\u7a0b\u8bf7\u6c42 (HttpClient)"},d=void 0,o={id:"http",title:"19. \u8fdc\u7a0b\u8bf7\u6c42",description:"\ud83d\udcdd \u6a21\u5757\u66f4\u65b0\u65e5\u5fd7",source:"@site/docs/http.mdx",sourceDirName:".",slug:"/http",permalink:"/docs/http",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/http.mdx",tags:[],version:"current",lastUpdatedBy:"\u767e\u5c0f\u50e7",lastUpdatedAt:1699432022,formattedLastUpdatedAt:"Nov 8, 2023",frontMatter:{id:"http",title:"19. \u8fdc\u7a0b\u8bf7\u6c42",sidebar_label:"19. \u8fdc\u7a0b\u8bf7\u6c42 (HttpClient)"},sidebar:"docs",previous:{title:"18. \u65e5\u5fd7\u8bb0\u5f55",permalink:"/docs/logging"},next:{title:"20. \u6570\u636e\u52a0\u89e3\u5bc6",permalink:"/docs/encryption"}},h={},p=[{value:"19.1 \u5173\u4e8e\u8fdc\u7a0b\u8bf7\u6c42",id:"191-\u5173\u4e8e\u8fdc\u7a0b\u8bf7\u6c42",level:2},{value:"19.2 \u8fdc\u7a0b\u8bf7\u6c42\u7684\u4f5c\u7528",id:"192-\u8fdc\u7a0b\u8bf7\u6c42\u7684\u4f5c\u7528",level:2},{value:"19.3 \u57fa\u7840\u4f7f\u7528",id:"193-\u57fa\u7840\u4f7f\u7528",level:2},{value:"19.3.1 \u6ce8\u518c\u670d\u52a1",id:"1931-\u6ce8\u518c\u670d\u52a1",level:3},{value:"19.3.2 \u4f7f\u7528\u65b9\u5f0f",id:"1932-\u4f7f\u7528\u65b9\u5f0f",level:3},{value:"19.4 \u5b57\u7b26\u4e32\u65b9\u5f0f\u4f7f\u7528\u793a\u4f8b",id:"194-\u5b57\u7b26\u4e32\u65b9\u5f0f\u4f7f\u7528\u793a\u4f8b",level:2},{value:"19.4.1 \u5185\u7f6e\u8bf7\u6c42\u65b9\u5f0f",id:"1941-\u5185\u7f6e\u8bf7\u6c42\u65b9\u5f0f",level:3},{value:"19.4.2 \u8bbe\u7f6e\u8bf7\u6c42\u5730\u5740",id:"1942-\u8bbe\u7f6e\u8bf7\u6c42\u5730\u5740",level:3},{value:"19.4.3 \u8bbe\u7f6e\u8bf7\u6c42\u65b9\u5f0f",id:"1943-\u8bbe\u7f6e\u8bf7\u6c42\u65b9\u5f0f",level:3},{value:"19.4.4 \u8bbe\u7f6e\u5730\u5740\u6a21\u677f",id:"1944-\u8bbe\u7f6e\u5730\u5740\u6a21\u677f",level:3},{value:"19.4.5 \u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934",id:"1945-\u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934",level:3},{value:"19.4.6 \u8bbe\u7f6e <code>URL</code> \u5730\u5740\u53c2\u6570",id:"1946-\u8bbe\u7f6e-url-\u5730\u5740\u53c2\u6570",level:3},{value:"19.4.7 \u8bbe\u7f6e\u8bf7\u6c42\u5ba2\u6237\u7aef",id:"1947-\u8bbe\u7f6e\u8bf7\u6c42\u5ba2\u6237\u7aef",level:3},{value:"19.4.8 \u8bbe\u7f6e <code>Body</code> \u53c2\u6570",id:"1948-\u8bbe\u7f6e-body-\u53c2\u6570",level:3},{value:"19.4.9 \u8bbe\u7f6e <code>Content-Type</code>",id:"1949-\u8bbe\u7f6e-content-type",level:3},{value:"19.4.10 \u8bbe\u7f6e\u5185\u5bb9\u7f16\u7801",id:"19410-\u8bbe\u7f6e\u5185\u5bb9\u7f16\u7801",level:3},{value:"19.4.11 \u8bbe\u7f6e <code>JSON</code> \u5e8f\u5217\u5316\u63d0\u4f9b\u7a0b\u5e8f",id:"19411-\u8bbe\u7f6e-json-\u5e8f\u5217\u5316\u63d0\u4f9b\u7a0b\u5e8f",level:3},{value:"19.4.12 \u542f\u7528 <code>Body</code> \u53c2\u6570\u9a8c\u8bc1",id:"19412-\u542f\u7528-body-\u53c2\u6570\u9a8c\u8bc1",level:3},{value:"19.4.13 \u8bf7\u6c42\u62e6\u622a",id:"19413-\u8bf7\u6c42\u62e6\u622a",level:3},{value:"19.4.14 <code>HttpClient</code> \u62e6\u622a",id:"19414-httpclient-\u62e6\u622a",level:3},{value:"19.4.15 \u8bf7\u6c42\u4e4b\u524d\u62e6\u622a",id:"19415-\u8bf7\u6c42\u4e4b\u524d\u62e6\u622a",level:3},{value:"19.4.16 \u6210\u529f\u8bf7\u6c42\u62e6\u622a",id:"19416-\u6210\u529f\u8bf7\u6c42\u62e6\u622a",level:3},{value:"19.4.17 \u8bf7\u6c42\u5f02\u5e38\u62e6\u622a",id:"19417-\u8bf7\u6c42\u5f02\u5e38\u62e6\u622a",level:3},{value:"19.4.18 \u5404\u79cd\u8fd4\u56de\u503c\u5904\u7406",id:"19418-\u5404\u79cd\u8fd4\u56de\u503c\u5904\u7406",level:3},{value:"19.4.19 \u8bbe\u7f6e <code>Byte[]/Stream</code> \u7c7b\u578b/\u4e0a\u4f20\u6587\u4ef6",id:"19419-\u8bbe\u7f6e-bytestream-\u7c7b\u578b\u4e0a\u4f20\u6587\u4ef6",level:3},{value:"19.4.20 \u8bbe\u7f6e <code>IServiceProvider</code>",id:"19420-\u8bbe\u7f6e-iserviceprovider",level:3},{value:"19.4.21 \u652f\u6301\u6a21\u677f\u914d\u7f6e",id:"19421-\u652f\u6301\u6a21\u677f\u914d\u7f6e",level:3},{value:"19.4.22 \u91cd\u8bd5\u7b56\u7565",id:"19422-\u91cd\u8bd5\u7b56\u7565",level:3},{value:"19.4.23 \u652f\u6301 <code>GZip</code> \u538b\u7f29",id:"19423-\u652f\u6301-gzip-\u538b\u7f29",level:3},{value:"19.4.24 \u8bbe\u7f6e <code>Url</code> \u8f6c\u7801",id:"19424-\u8bbe\u7f6e-url-\u8f6c\u7801",level:3},{value:"19.4.25 \u8bbe\u7f6e <code>HTTP</code> \u7248\u672c",id:"19425-\u8bbe\u7f6e-http-\u7248\u672c",level:3},{value:"19.4.26 \u4e0b\u8f7d\u8fdc\u7a0b\u6587\u4ef6\u5e76\u4fdd\u5b58",id:"19426-\u4e0b\u8f7d\u8fdc\u7a0b\u6587\u4ef6\u5e76\u4fdd\u5b58",level:3},{value:"19.5 <code>IHttpDispatchProxy</code> \u4ee3\u7406\u65b9\u5f0f",id:"195-ihttpdispatchproxy-\u4ee3\u7406\u65b9\u5f0f",level:2},{value:"19.5.1 \u652f\u6301\u591a\u79cd\u4ee3\u7406\u65b9\u5f0f",id:"1951-\u652f\u6301\u591a\u79cd\u4ee3\u7406\u65b9\u5f0f",level:3},{value:"19.5.2 \u8bbe\u7f6e\u5730\u5740\u6a21\u677f",id:"1952-\u8bbe\u7f6e\u5730\u5740\u6a21\u677f",level:3},{value:"19.5.3 \u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934",id:"1953-\u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934",level:3},{value:"19.5.4 \u8bbe\u7f6e <code>URL</code> \u5730\u5740\u53c2\u6570",id:"1954-\u8bbe\u7f6e-url-\u5730\u5740\u53c2\u6570",level:3},{value:"19.5.5 \u8bbe\u7f6e\u8bf7\u6c42\u5ba2\u6237\u7aef",id:"1955-\u8bbe\u7f6e\u8bf7\u6c42\u5ba2\u6237\u7aef",level:3},{value:"19.5.6 \u8bbe\u7f6e <code>Body</code> \u53c2\u6570",id:"1956-\u8bbe\u7f6e-body-\u53c2\u6570",level:3},{value:"19.5.7 \u8bbe\u7f6e <code>JSON</code> \u5e8f\u5217\u5316\u63d0\u4f9b\u7a0b\u5e8f",id:"1957-\u8bbe\u7f6e-json-\u5e8f\u5217\u5316\u63d0\u4f9b\u7a0b\u5e8f",level:3},{value:"19.5.8 \u53c2\u6570\u9a8c\u8bc1",id:"1958-\u53c2\u6570\u9a8c\u8bc1",level:3},{value:"19.5.9 \u8bf7\u6c42\u62e6\u622a",id:"1959-\u8bf7\u6c42\u62e6\u622a",level:3},{value:"19.5.10 <code>HttpClient</code> \u62e6\u622a",id:"19510-httpclient-\u62e6\u622a",level:3},{value:"19.5.11 \u8bf7\u6c42\u4e4b\u524d\u62e6\u622a",id:"19511-\u8bf7\u6c42\u4e4b\u524d\u62e6\u622a",level:3},{value:"19.5.12 \u6210\u529f\u8bf7\u6c42\u62e6\u622a",id:"19512-\u6210\u529f\u8bf7\u6c42\u62e6\u622a",level:3},{value:"19.5.13 \u8bf7\u6c42\u5f02\u5e38\u62e6\u622a",id:"19513-\u8bf7\u6c42\u5f02\u5e38\u62e6\u622a",level:3},{value:"19.5.14 \u5404\u79cd\u8fd4\u56de\u503c\u5904\u7406",id:"19514-\u5404\u79cd\u8fd4\u56de\u503c\u5904\u7406",level:3},{value:"19.5.15 \u8bbe\u7f6e <code>Byte[]/Stream</code> \u7c7b\u578b/\u4e0a\u4f20\u6587\u4ef6",id:"19515-\u8bbe\u7f6e-bytestream-\u7c7b\u578b\u4e0a\u4f20\u6587\u4ef6",level:3},{value:"19.5.16 \u652f\u6301\u6a21\u677f\u914d\u7f6e",id:"19516-\u652f\u6301\u6a21\u677f\u914d\u7f6e",level:3},{value:"19.5.17 \u91cd\u8bd5\u7b56\u7565",id:"19517-\u91cd\u8bd5\u7b56\u7565",level:3},{value:"19.5.18 \u652f\u6301 <code>GZip</code>",id:"19518-\u652f\u6301-gzip",level:3},{value:"19.5.19 \u8bbe\u7f6e <code>Url</code> \u8f6c\u7801",id:"19519-\u8bbe\u7f6e-url-\u8f6c\u7801",level:3},{value:"19.5.20 \u8bbe\u7f6e <code>HTTP</code> \u7248\u672c",id:"19520-\u8bbe\u7f6e-http-\u7248\u672c",level:3},{value:"19.6 \u8bf7\u6c42\u5ba2\u6237\u7aef\u914d\u7f6e",id:"196-\u8bf7\u6c42\u5ba2\u6237\u7aef\u914d\u7f6e",level:2},{value:"19.6.1 <code>Startup.cs</code> \u7edf\u4e00\u914d\u7f6e",id:"1961-startupcs-\u7edf\u4e00\u914d\u7f6e",level:3},{value:"19.6.2 \u914d\u7f6e\u5ba2\u6237\u7aef <code>Timeout</code>",id:"1962-\u914d\u7f6e\u5ba2\u6237\u7aef-timeout",level:3},{value:"19.6.3 \u914d\u7f6e\u5ba2\u6237\u7aef\u751f\u5b58\u671f",id:"1963-\u914d\u7f6e\u5ba2\u6237\u7aef\u751f\u5b58\u671f",level:3},{value:"19.6.4 \u81ea\u5b9a\u4e49 <code>Client</code> \u7c7b\u65b9\u5f0f",id:"1964-\u81ea\u5b9a\u4e49-client-\u7c7b\u65b9\u5f0f",level:3},{value:"19.6.5 \u81ea\u5b9a\u4e49 <code>Client</code> \u7c7b + \u63a5\u53e3\u65b9\u5f0f",id:"1965-\u81ea\u5b9a\u4e49-client-\u7c7b--\u63a5\u53e3\u65b9\u5f0f",level:3},{value:"19.6.6 <code>HttpClient</code> \u8d85\u65f6\u95ee\u9898",id:"1966-httpclient-\u8d85\u65f6\u95ee\u9898",level:3},{value:"19.7 <code>SSL/https</code> \u8bc1\u4e66\u914d\u7f6e",id:"197-sslhttps-\u8bc1\u4e66\u914d\u7f6e",level:2},{value:"19.7.1 \u4f7f\u7528\u9ed8\u8ba4 <code>SSL</code> \u8bc1\u4e66",id:"1971-\u4f7f\u7528\u9ed8\u8ba4-ssl-\u8bc1\u4e66",level:3},{value:"19.7.2 \u5ffd\u7565\u7279\u5b9a\u5ba2\u6237\u7aef <code>SSL</code> \u8bc1\u4e66\u68c0\u67e5",id:"1972-\u5ffd\u7565\u7279\u5b9a\u5ba2\u6237\u7aef-ssl-\u8bc1\u4e66\u68c0\u67e5",level:3},{value:"19.7.3 \u624b\u52a8\u6307\u5b9a <code>SSL</code> \u8bc1\u4e66",id:"1973-\u624b\u52a8\u6307\u5b9a-ssl-\u8bc1\u4e66",level:3},{value:"19.7.4 \u5ffd\u7565\u6240\u6709\u5ba2\u6237\u7aef\u8bc1\u4e66\u68c0\u67e5",id:"1974-\u5ffd\u7565\u6240\u6709\u5ba2\u6237\u7aef\u8bc1\u4e66\u68c0\u67e5",level:3},{value:"19.8 \u914d\u7f6e\u5ba2\u6237\u7aef\u8bf7\u6c42\u4ee3\u7406",id:"198-\u914d\u7f6e\u5ba2\u6237\u7aef\u8bf7\u6c42\u4ee3\u7406",level:2},{value:"19.9 \u5173\u4e8e\u8fd4\u56de\u503c\u975e <code>200</code> \u65f6\u5ffd\u7565 <code>Http\u72b6\u6001</code>",id:"199-\u5173\u4e8e\u8fd4\u56de\u503c\u975e-200-\u65f6\u5ffd\u7565-http\u72b6\u6001",level:2},{value:"19.10 \u5173\u4e8e\u540c\u6b65\u8bf7\u6c42",id:"1910-\u5173\u4e8e\u540c\u6b65\u8bf7\u6c42",level:2},{value:"19.11 \u9759\u6001 <code>Default</code> \u65b9\u5f0f\u6784\u5efa",id:"1911-\u9759\u6001-default-\u65b9\u5f0f\u6784\u5efa",level:2},{value:"19.12 \u5173\u95ed <code>Http</code> \u8bf7\u6c42\u65e5\u5fd7",id:"1912-\u5173\u95ed-http-\u8bf7\u6c42\u65e5\u5fd7",level:2},{value:"19.13 \u83b7\u53d6 <code>Cookies</code>",id:"1913-\u83b7\u53d6-cookies",level:2},{value:"19.14 \u5728 <code>WinForm/WPF</code> \u4e2d\u4f7f\u7528",id:"1914-\u5728-winformwpf-\u4e2d\u4f7f\u7528",level:2},{value:"19.15 \u53cd\u9988\u4e0e\u5efa\u8bae",id:"1915-\u53cd\u9988\u4e0e\u5efa\u8bae",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",del:"del",h2:"h2",h3:"h3",hr:"hr",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"\ud83d\udcdd \u6a21\u5757\u66f4\u65b0\u65e5\u5fd7"}),(0,r.jsx)("div",{children:(0,r.jsx)("div",{children:(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u65b0\u7279\u6027"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u65b0\u589e"})," \u8fdc\u7a0b\u8bf7\u6c42 ",(0,r.jsx)(n.code,{children:"[HttpMethod]ToSaveAsync"})," \u4e0b\u8f7d\u8fdc\u7a0b\u6587\u4ef6\u5e76\u4fdd\u5b58\u5230\u78c1\u76d8\u65b9\u6cd5 ",(0,r.jsx)("sup",{children:"4.8.7.32"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.04.02"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/bfd02c1a2ce4229e90fc825fe5657ada59e1892f",children:"bfd02c1"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u65b0\u589e"})," \u8fdc\u7a0b\u8bf7\u6c42\u652f\u6301 ",(0,r.jsx)(n.code,{children:"Content-Type"})," \u4e3a ",(0,r.jsx)(n.code,{children:"text/html"})," \u548c ",(0,r.jsx)(n.code,{children:"text/plain"})," \u5904\u7406 ",(0,r.jsx)("sup",{children:"4.8.7.22"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.03.27"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6QMLR",children:"#I6QMLR"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u65b0\u589e"})," \u8fdc\u7a0b\u8bf7\u6c42 ",(0,r.jsx)(n.code,{children:"HttpRequestMessage"})," \u62d3\u5c55\u65b9\u6cd5 ",(0,r.jsx)(n.code,{children:"AppendHeaders"})," ",(0,r.jsx)("sup",{children:"4.8.7.10"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.03.14"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6MVHT",children:"#I6MVHT"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u65b0\u589e"})," \u8fdc\u7a0b\u8bf7\u6c42\u914d\u7f6e ",(0,r.jsx)(n.code,{children:"SetHttpVersion(version)"})," \u914d\u7f6e\uff0c\u53ef\u914d\u7f6e ",(0,r.jsx)(n.code,{children:"HTTP"})," \u8bf7\u6c42\u7248\u672c\uff0c\u9ed8\u8ba4\u4e3a ",(0,r.jsx)(n.code,{children:"1.1"})," ",(0,r.jsx)("sup",{children:"4.8.5.8"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.02.06"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6D64H",children:"#I6D64H"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u65b0\u589e"})," \u8fdc\u7a0b\u8bf7\u6c42 ",(0,r.jsx)(n.code,{children:"[QueryString]"})," \u7279\u6027\u6dfb\u52a0\u65f6\u95f4\u683c\u5f0f\u5316 ",(0,r.jsx)(n.code,{children:"Format"})," \u5c5e\u6027 ",(0,r.jsx)("sup",{children:"4.8.1.2"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2022.11.24"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/pulls/670",children:"!670"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u95ee\u9898\u4fee\u590d"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," \u8fdc\u7a0b\u8bf7\u6c42\u83b7\u53d6\u54cd\u5e94 ",(0,r.jsx)(n.code,{children:"Cookies"})," \u88ab\u622a\u65ad\u95ee\u9898 ",(0,r.jsx)("sup",{children:"4.8.8.54"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.11.08"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I8EV1Z",children:"#I8EV1Z"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," \u8fdc\u7a0b\u8bf7\u6c42\u4e0a\u4f20\u6587\u4ef6\u5728\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\u83b7\u53d6\u6587\u4ef6\u540d\u5b58\u5728\u53cc\u5f15\u53f7\u95ee\u9898 ",(0,r.jsx)("sup",{children:"4.8.8.53"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.11.07"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I8EF1S",children:"#I8EF1S"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," \u8fdc\u7a0b\u8bf7\u6c42\u5728\u88ab\u8bf7\u6c42\u7aef\u8fd4\u56de\u975e ",(0,r.jsx)(n.code,{children:"200"})," \u72b6\u6001\u7801\u4f46\u5b9e\u9645\u8bf7\u6c42\u5df2\u5904\u7406\u4e5f\u629b\u5f02\u5e38\u95ee\u9898 ",(0,r.jsx)("sup",{children:"4.8.8.14"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.05.12"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/b14a51fd6f85a905da50729d521a2232b5c9afc1",children:"b14a51f"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," \u8fdc\u7a0b\u8bf7\u6c42 ",(0,r.jsx)(n.code,{children:"Body"})," \u53c2\u6570\u4e3a\u7c98\u571f\u5bf9\u8c61 ",(0,r.jsx)(n.code,{children:"Clay"})," \u7c7b\u578b\u5e8f\u5217\u5316\u6709\u8bef ",(0,r.jsx)("sup",{children:"4.8.8.1"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.04.18"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6WKRZ",children:"#I6WKRZ"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," \u8fdc\u7a0b\u8bf7\u6c42\u83b7\u53d6 ",(0,r.jsx)(n.code,{children:"Cookies"})," \u65f6\u5982\u679c\u5305\u542b\u76f8\u540c ",(0,r.jsx)(n.code,{children:"Key"})," \u5f02\u5e38\u95ee\u9898 ",(0,r.jsx)("sup",{children:"4.8.7.44"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.04.12"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6V3T7",children:"#I6V3T7"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," \u8fdc\u7a0b\u8bf7\u6c42\u4ee3\u7406\u6a21\u5f0f\u914d\u7f6e\u4e86 ",(0,r.jsx)(n.code,{children:"WithEncodeUrl = false"})," \u65e0\u6548\u95ee\u9898 ",(0,r.jsx)("sup",{children:"4.8.6.4"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.02.16"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/89639ba1db8a7df750d9bca66a887e252622b219",children:"89639ba"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," \u7531\u4e8e ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6D64H",children:"#I6D64H"})," \u5bfc\u81f4\u8fdc\u7a0b\u8bf7\u6c42\u51fa\u73b0 ",(0,r.jsx)(n.code,{children:"Specified method is not supported."})," \u95ee\u9898 ",(0,r.jsx)("sup",{children:"4.8.5.9"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.02.07"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6DEEE",children:"#I6DEEE"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6D64H",children:"#I6D64H"})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," ",(0,r.jsxs)(n.del,{children:["\u4f18\u5316\u8fdc\u7a0b\u8bf7\u6c42 ",(0,r.jsx)(n.code,{children:"ReadAsStringAsync"})," \u5e95\u5c42\u65b9\u6cd5\uff0c\u5c1d\u8bd5\u4fee\u590d ",(0,r.jsx)(n.code,{children:"Error while copying content to a stream."})," \u9519\u8bef ",(0,r.jsx)("sup",{children:"4.8.5.8"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.02.06"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6D64H",children:"#I6D64H"})]})]}),"\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u4fee\u590d"})," \u8fdc\u7a0b\u8bf7\u6c42\u914d\u7f6e ",(0,r.jsx)(n.code,{children:"WithEncodeUrl(false)"})," \u5bf9 ",(0,r.jsx)(n.code,{children:"application/x-www-form-urlencoded"})," \u8bf7\u6c42\u7c7b\u578b\u65e0\u6548 ",(0,r.jsx)("sup",{children:"4.8.4"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2022.12.30"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I682DX",children:"#I682DX"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u5176\u4ed6\u66f4\u6539"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u8c03\u6574"})," \u53d6\u6d88\u8fdc\u7a0b\u8bf7\u6c42 ",(0,r.jsx)(n.code,{children:"GET/HEAD"})," \u4e0d\u80fd\u4f20\u9012 ",(0,r.jsx)(n.code,{children:"Body"})," \u7684\u9650\u5236 ",(0,r.jsx)("sup",{children:"4.8.8.39"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2023.08.02"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/8113460ab8b23cbf392c49b79fe4eb77a89c8010",children:"8113460"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u6587\u6863"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\xa0",(0,r.jsx)(i.Z,{children:"\u65b0\u589e"})," \u8fdc\u7a0b\u8bf7\u6c42 ",(0,r.jsx)(n.code,{children:"[QueryString]"})," \u914d\u7f6e\u65f6\u95f4\u7c7b\u578b ",(0,r.jsx)(n.code,{children:"Format"})," \u683c\u5f0f\u5316\u6587\u6863 ",(0,r.jsx)("sup",{children:"4.8.1.2"})," ",(0,r.jsx)("sup",{children:"\u23f1\ufe0f2022.11.25"})," ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/pulls/673",children:"!673"})]}),"\n"]}),"\n"]}),"\n"]})})})]}),"\n",(0,r.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,r.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,r.jsx)(n.code,{children:"Furion 1.16.0 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n","\n","\n",(0,r.jsx)(n.h2,{id:"191-\u5173\u4e8e\u8fdc\u7a0b\u8bf7\u6c42",children:"19.1 \u5173\u4e8e\u8fdc\u7a0b\u8bf7\u6c42"}),"\n",(0,r.jsxs)(n.p,{children:["\u5728\u4e92\u8054\u7f51\u5927\u6570\u636e\u7684\u9a71\u52a8\u4e0b\uff0c\u5e73\u53f0\u6216\u7cfb\u7edf\u514d\u4e0d\u4e86\u9700\u8981\u548c\u7b2c\u4e09\u65b9\u8fdb\u884c\u6570\u636e\u4ea4\u4e92\uff0c\u800c\u7b2c\u4e09\u65b9\u5f80\u5f80\u63d0\u4f9b\u4e86 ",(0,r.jsx)(n.code,{children:"RESTful API"})," \u63a5\u53e3\u89c4\u8303\uff0c\u8fd9\u4e2a\u65f6\u5019\u5c31\u9700\u8981\u901a\u8fc7 ",(0,r.jsx)(n.code,{children:"Http"})," \u8bf7\u6c42\u7b2c\u4e09\u65b9\u63a5\u53e3\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u4ea4\u4e92\u3002"]}),"\n",(0,r.jsx)(n.p,{children:"\u4e5f\u5c31\u662f\u672c\u7ae0\u8282\u6240\u8bf4\u7684\u8fdc\u7a0b\u8bf7\u6c42\u3002"}),"\n",(0,r.jsx)(n.h2,{id:"192-\u8fdc\u7a0b\u8bf7\u6c42\u7684\u4f5c\u7528",children:"19.2 \u8fdc\u7a0b\u8bf7\u6c42\u7684\u4f5c\u7528"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u8de8\u7cfb\u7edf\u3001\u8de8\u8bbe\u5907\u901a\u4fe1"}),"\n",(0,r.jsx)(n.li,{children:"\u5b9e\u73b0\u591a\u4e2a\u7cfb\u7edf\u6570\u636e\u4f20\u8f93\u4ea4\u4e92"}),"\n",(0,r.jsx)(n.li,{children:"\u8de8\u7f16\u7a0b\u8bed\u8a00\u534f\u540c\u5f00\u53d1"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"193-\u57fa\u7840\u4f7f\u7528",children:"19.3 \u57fa\u7840\u4f7f\u7528"}),"\n",(0,r.jsx)(n.h3,{id:"1931-\u6ce8\u518c\u670d\u52a1",children:"19.3.1 \u6ce8\u518c\u670d\u52a1"}),"\n",(0,r.jsxs)(n.p,{children:["\u4f7f\u7528\u4e4b\u524d\u9700\u5728 ",(0,r.jsx)(n.code,{children:"Startup.cs"})," \u6ce8\u518c ",(0,r.jsx)(n.code,{children:"\u8fdc\u7a0b\u8bf7\u6c42\u670d\u52a1"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:"public void ConfigureServices(IServiceCollection services)\r\n{\r\n services.AddRemoteRequest();\r\n}\n"})}),"\n",(0,r.jsx)(n.h3,{id:"1932-\u4f7f\u7528\u65b9\u5f0f",children:"19.3.2 \u4f7f\u7528\u65b9\u5f0f"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u63d0\u4f9b\u4e24\u79cd\u65b9\u5f0f\u8bbf\u95ee\u53d1\u9001\u8fdc\u7a0b\u8bf7\u6c42\u3002"]}),"\n",(0,r.jsxs)(l.Z,{defaultValue:"IHttpDispatchProxy \u4ee3\u7406\u65b9\u5f0f",values:[{label:"IHttpDispatchProxy \u4ee3\u7406\u65b9\u5f0f",value:"IHttpDispatchProxy \u4ee3\u7406\u65b9\u5f0f"},{label:"\u5b57\u7b26\u4e32\u62d3\u5c55\u65b9\u5f0f",value:"\u5b57\u7b26\u4e32\u62d3\u5c55\u65b9\u5f0f"}],children:[(0,r.jsxs)(c.Z,{value:"IHttpDispatchProxy \u4ee3\u7406\u65b9\u5f0f",children:[(0,r.jsxs)(n.p,{children:["\u5b9a\u4e49\u4ee3\u7406\u8bf7\u6c42\u7684 ",(0,r.jsx)(n.code,{children:"\u63a5\u53e3"})," \u5e76\u7ee7\u627f ",(0,r.jsx)(n.code,{children:"IHttpDispatchProxy"})," \u63a5\u53e3"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3,6,9,12,15,18}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Get("http://furion.baiqian.ltd/get")]\r\n Task<Result> GetXXXAsync();\r\n\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<Result> PostXXXAsync();\r\n\r\n [Put("http://furion.baiqian.ltd/put")]\r\n Task<Result> PutXXXAsync();\r\n\r\n [Delete("http://furion.baiqian.ltd/delete")]\r\n Task<Result> DeleteXXXAsync();\r\n\r\n [Patch("http://furion.baiqian.ltd/patch")]\r\n Task<Result> PatchXXXAsync();\r\n\r\n [Head("http://furion.baiqian.ltd/head")]\r\n Task<Result> HeadXXXAsync();\r\n}\n'})}),(0,r.jsxs)(n.p,{children:["\u901a\u8fc7\u6784\u9020\u51fd\u6570\u6ce8\u5165 ",(0,r.jsx)(n.code,{children:"\u63a5\u53e3"})]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {9,16}",children:"using Furion.DynamicApiController;\r\nusing Furion.RemoteRequest.Extensions;\r\n\r\nnamespace Furion.Application\r\n{\r\n public class RemoteRequestService : IDynamicApiController\r\n {\r\n private readonly IHttp _http;\r\n public RemoteRequestService(IHttp http)\r\n {\r\n _http = http;\r\n }\r\n\r\n public async Task GetData()\r\n {\r\n var data = await _http.GetXXXAsync();\r\n }\r\n }\r\n}\n"})})]}),(0,r.jsxs)(c.Z,{value:"\u5b57\u7b26\u4e32\u62d3\u5c55\u65b9\u5f0f",children:[(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'var response = await "http://furion.baiqian.ltd/get".GetAsync();\r\n\r\nvar response = await "http://furion.baiqian.ltd/post".PostAsync();\r\n\r\nvar response = await "http://furion.baiqian.ltd/put".PutAsync();\r\n\r\nvar response = await "http://furion.baiqian.ltd/delete".DeleteAsync();\r\n\r\nvar response = await "http://furion.baiqian.ltd/patch".PatchAsync();\r\n\r\nvar response = await "http://furion.baiqian.ltd/head".HeadAsync();\n'})}),(0,r.jsxs)(n.p,{children:["\u9700\u5f15\u5165 ",(0,r.jsx)(n.code,{children:"using Furion.RemoteRequest.Extensions"})," \u547d\u540d\u7a7a\u95f4\u3002"]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"194-\u5b57\u7b26\u4e32\u65b9\u5f0f\u4f7f\u7528\u793a\u4f8b",children:"19.4 \u5b57\u7b26\u4e32\u65b9\u5f0f\u4f7f\u7528\u793a\u4f8b"}),"\n",(0,r.jsx)(n.admonition,{title:"\u6e29\u99a8\u63d0\u793a",type:"important",children:(0,r.jsxs)(n.p,{children:["\u63a8\u8350\u4f7f\u7528 \u300a",(0,r.jsx)(n.a,{href:"/docs/http#195-ihttpdispatchproxy-%E4%BB%A3%E7%90%86%E6%96%B9%E5%BC%8F",children:"19.5 \u4ee3\u7406\u65b9\u5f0f"}),"\u300b\u4ee3\u66ff\u672c\u5c0f\u8282\u529f\u80fd\u3002",(0,r.jsx)(n.code,{children:"\u4ee3\u7406\u65b9\u5f0f"})," \u80fd\u591f\u63d0\u4f9b\u66f4\u5bb9\u6613\u4e14\u66f4\u6613\u7ef4\u62a4\u7684\u65b9\u5f0f\u3002"]})}),"\n",(0,r.jsx)(n.h3,{id:"1941-\u5185\u7f6e\u8bf7\u6c42\u65b9\u5f0f",children:"19.4.1 \u5185\u7f6e\u8bf7\u6c42\u65b9\u5f0f"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u53d1\u9001 Get \u8bf7\u6c42\r\nvar response = await "http://furion.baiqian.ltd/get".GetAsync();\r\n\r\n// \u53d1\u9001 Post \u8bf7\u6c42\r\nvar response = await "http://furion.baiqian.ltd/post".PostAsync();\r\n\r\n// \u53d1\u9001 Put \u8bf7\u6c42\r\nvar response = await "http://furion.baiqian.ltd/put".PutAsync();\r\n\r\n// \u53d1\u9001 Delete \u8bf7\u6c42\r\nvar response = await "http://furion.baiqian.ltd/delete".DeleteAsync();\r\n\r\n// \u53d1\u9001 Patch \u8bf7\u6c42\r\nvar response = await "http://furion.baiqian.ltd/patch".PatchAsync();\r\n\r\n// \u53d1\u9001 Head \u8bf7\u6c42\r\nvar response = await "http://furion.baiqian.ltd/head".HeadAsync();\r\n\r\n// \u624b\u52a8\u6307\u5b9a\u53d1\u9001\u7279\u5b9a\u8bf7\u6c42\r\nvar response = await "http://furion.baiqian.ltd/post".SetHttpMethod(HttpMethod.Post)\r\n .SendAsync();\n'})}),"\n",(0,r.jsx)(n.h3,{id:"1942-\u8bbe\u7f6e\u8bf7\u6c42\u5730\u5740",children:"19.4.2 \u8bbe\u7f6e\u8bf7\u6c42\u5730\u5740"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u8be5\u65b9\u5f0f\u5728 Furion v3.0.0 \u5df2\u79fb\u9664\uff0c\u591a\u6b64\u4e00\u4e3e\u4e86\r\nawait "".SetRequestUrl("http://furion.baiqian.ltd/");\n'})}),"\n",(0,r.jsx)(n.h3,{id:"1943-\u8bbe\u7f6e\u8bf7\u6c42\u65b9\u5f0f",children:"19.4.3 \u8bbe\u7f6e\u8bf7\u6c42\u65b9\u5f0f"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/post".SetHttpMethod(HttpMethod.Get);\n'})}),"\n",(0,r.jsx)(n.h3,{id:"1944-\u8bbe\u7f6e\u5730\u5740\u6a21\u677f",children:"19.4.4 \u8bbe\u7f6e\u5730\u5740\u6a21\u677f"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u5b57\u5178\u65b9\u5f0f\r\nawait "http://furion.baiqian.ltd/post/{id}?name={name}&id={p.Id}".SetTemplates(new Dictionary<string , object> {\r\n { "id", 1 },\r\n { "name", "Furion" },\r\n { "p.Id", new Person { Id = 1 } }\r\n});\r\n\r\n// \u5bf9\u8c61/\u533f\u540d\u5bf9\u8c61\u65b9\u5f0f\r\nawait "http://furion.baiqian.ltd/post/{id}?name={name}".SetTemplates(new {\r\n id = 1,\r\n name = "Furion"\r\n});\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u6ce8\uff1a\u6a21\u677f\u66ff\u6362\u533a\u5206\u5927\u5c0f\u5199\u3002"})}),"\n",(0,r.jsx)(n.h3,{id:"1945-\u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934",children:"19.4.5 \u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u5b57\u5178\u65b9\u5f0f\r\nawait "http://furion.baiqian.ltd/post".SetHeaders(new Dictionary<string , object> {\r\n { "Authorization", "Bearer \u4f60\u7684token"},\r\n { "X-Authorization", "Bearer \u4f60\u7684\u5237\u65b0token"}\r\n});\r\n\r\n// \u5bf9\u8c61/\u533f\u540d\u5bf9\u8c61\u65b9\u5f0f\r\nawait "http://furion.baiqian.ltd/post".SetHeaders(new {\r\n Authorization = "Bearer \u4f60\u7684token"\r\n});\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1946-\u8bbe\u7f6e-url-\u5730\u5740\u53c2\u6570",children:["19.4.6 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"URL"})," \u5730\u5740\u53c2\u6570"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u5b57\u5178\u65b9\u5f0f\r\nawait "http://furion.baiqian.ltd/get".SetQueries(new Dictionary<string , object> {\r\n { "id", 1 },\r\n { "name", "Furion"}\r\n});\r\n\r\n// \u5bf9\u8c61/\u533f\u540d\u5bf9\u8c61\u65b9\u5f0f\r\nawait "http://furion.baiqian.ltd/get".SetQueries(new {\r\n id = 1,\r\n name = "Furion"\r\n});\r\n\r\n// Furion 4.7.3+ \u65b0\u589e\u5ffd\u7565 null \u503c\u91cd\u8f7d\r\nawait "http://furion.baiqian.ltd/get".SetQueries(new {\r\n id = 1,\r\n name = "Furion",\r\n nullValue = default(object)\r\n}, true); // \u8bbe\u7f6e true \u5219\u5ffd\u7565 null \u503c\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u6700\u7ec8\u8f93\u51fa\u683c\u5f0f\u4e3a\uff1a",(0,r.jsx)(n.code,{children:"http://furion.baiqian.ltd/get?id=1&name=Furion"}),"\u3002"]}),"\n",(0,r.jsx)(n.h3,{id:"1947-\u8bbe\u7f6e\u8bf7\u6c42\u5ba2\u6237\u7aef",children:"19.4.7 \u8bbe\u7f6e\u8bf7\u6c42\u5ba2\u6237\u7aef"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"\u5168\u5c40\u914d\u7f6e\u65b9\u5f0f"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3-4,12}",children:'services.AddRemoteRequest(options=>\r\n{\r\n // \u914d\u7f6e Github \u57fa\u672c\u4fe1\u606f\r\n options.AddHttpClient("github", c =>\r\n {\r\n c.BaseAddress = new Uri("https://api.github.com/");\r\n c.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json");\r\n c.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample");\r\n });\r\n});\r\n\r\nawait "get".SetClient("github");\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u6700\u7ec8\u751f\u6210\u8bf7\u6c42\u5730\u5740\u4e3a\uff1a",(0,r.jsx)(n.code,{children:"https://api.github.com/get"}),"\u3002"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"\u5c40\u90e8\u914d\u7f6e\u65b9\u5f0f"})}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,r.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,r.jsx)(n.code,{children:"Furion 4.3.8 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd".SetClient(() => new HttpClient());\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1948-\u8bbe\u7f6e-body-\u53c2\u6570",children:["19.4.8 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Body"})," \u53c2\u6570"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u4f20\u5165\u5bf9\u8c61\r\nawait "http://furion.baiqian.ltd/api/user/add".SetBody(new User { Id = 1, Name = "Furion" });\r\n\r\n// \u914d\u7f6e Content-Type\r\nawait "http://furion.baiqian.ltd/api/user/add".SetBody(new { Id = 1, Name = "Furion" }, "application/json");\r\n\r\n// \u8bbe\u7f6e Encoding \u7f16\u7801\r\nawait "http://furion.baiqian.ltd/api/user/add".SetBody(new User { Id = 1, Name = "Furion" }, "application/json", Encoding.UTF8);\r\n\r\n// \u5904\u7406 application/x-www-form-urlencoded \u8bf7\u6c42\r\nawait "http://furion.baiqian.ltd/api/user/add".SetBody(new Dictionary<string , object> {\r\n { "Id", 1 },\r\n { "Name", "Furion"}\r\n}, "application/x-www-form-urlencoded");\r\n\r\n// \u5904\u7406 application/xml\u3001text/xml\r\nawait "http://furion.baiqian.ltd/api/user/add".SetBody("<SomeDto><SomeTag>somevalue</SomeTag></SomeDto>", "application/xml");\n'})}),"\n",(0,r.jsx)(n.admonition,{title:"\u7279\u522b\u6ce8\u610f",type:"important",children:(0,r.jsxs)(n.p,{children:["\u5982\u679c\u8bf7\u6c42 ",(0,r.jsx)(n.code,{children:"Content-Type"})," \u8bbe\u7f6e\u4e3a ",(0,r.jsx)(n.code,{children:"application/x-www-form-urlencoded"})," \u7c7b\u578b\uff0c\u90a3\u4e48\u5e95\u5c42\u81ea\u52a8\u5c06\u6570\u636e\u8fdb\u884c ",(0,r.jsx)(n.code,{children:"UrlEncode"})," \u7f16\u7801\u5904\u7406\uff0c\u65e0\u9700\u5916\u90e8\u5904\u7406\u3002"]})}),"\n",(0,r.jsxs)(n.h3,{id:"1949-\u8bbe\u7f6e-content-type",children:["19.4.9 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Content-Type"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/post".SetContentType("application/json");\n'})}),"\n",(0,r.jsx)(n.h3,{id:"19410-\u8bbe\u7f6e\u5185\u5bb9\u7f16\u7801",children:"19.4.10 \u8bbe\u7f6e\u5185\u5bb9\u7f16\u7801"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/post".SetContentEncoding(Encoding.UTF8);\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"19411-\u8bbe\u7f6e-json-\u5e8f\u5217\u5316\u63d0\u4f9b\u7a0b\u5e8f",children:["19.4.11 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u63d0\u4f9b\u7a0b\u5e8f"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u9ed8\u8ba4\u60c5\u51b5\u4e0b\u91c7\u7528 ",(0,r.jsx)(n.code,{children:"System.Text.Json"})," \u8fdb\u884c ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u5904\u7406\uff0c\u5982\u9700\u8bbe\u7f6e\u7b2c\u4e09\u65b9 ",(0,r.jsx)(n.code,{children:"JSON"})," \u63d0\u4f9b\u5668\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u914d\u7f6e\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u6cdb\u578b\u65b9\u5f0f\r\nawait "http://furion.baiqian.ltd/api/user/add".SetJsonSerialization<NewtonsoftJsonSerializerProvider>();\r\n\r\n// \u975e\u6cdb\u578b\u65b9\u5f0f\r\nawait "http://furion.baiqian.ltd/api/user/add".SetJsonSerialization(typeof(NewtonsoftJsonSerializerProvider));\r\n\r\n// \u6dfb\u52a0\u66f4\u591a\u914d\u7f6e\r\nawait "http://furion.baiqian.ltd/api/user/add".SetJsonSerialization<NewtonsoftJsonSerializerProvider>(new JsonSerializerSettings {\r\n\r\n});\r\n\r\n// \u6bd4\u5982\u914d\u7f6e\u7f3a\u7701\u7684\u5e8f\u5217\u5316\u9009\u9879\r\nawait "http://furion.baiqian.ltd".SetJsonSerialization(default, new JsonSerializerOptions\r\n {\r\n // \u4e2d\u6587\u4e71\u7801\r\n Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping\r\n })\r\n .GetAsAsync();\n'})}),"\n",(0,r.jsxs)(n.admonition,{type:"important",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:["\u5173\u4e8e ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u63d0\u4f9b\u5668"]}),(0,r.jsxs)(n.p,{children:["\u5982\u9700\u4e86\u89e3\u66f4\u591a ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u77e5\u8bc6\u53ef\u67e5\u9605 ",(0,r.jsx)(n.a,{href:"json-serialization#2351-%E8%87%AA%E5%AE%9A%E4%B9%89%E5%BA%8F%E5%88%97%E5%8C%96%E6%8F%90%E4%BE%9B%E5%99%A8",children:"23. JSON \u5e8f\u5217\u5316"})," \u7ae0\u8282"]})]}),"\n",(0,r.jsxs)(n.h3,{id:"19412-\u542f\u7528-body-\u53c2\u6570\u9a8c\u8bc1",children:["19.4.12 \u542f\u7528 ",(0,r.jsx)(n.code,{children:"Body"})," \u53c2\u6570\u9a8c\u8bc1"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/api/user/add".SetValidationState();\r\n\r\n// \u8bbe\u7f6e\u4e0d\u9a8c\u8bc1 null \u503c\r\nawait "http://furion.baiqian.ltd/api/user/add".SetValidationState(includeNull: true);\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u652f\u6301\u7c7b\u4e2d ",(0,r.jsx)(n.code,{children:"[Required]"})," \u7b49\u5b8c\u6574\u6a21\u578b\u9a8c\u8bc1\u7279\u6027\u3002"]}),"\n",(0,r.jsx)(n.h3,{id:"19413-\u8bf7\u6c42\u62e6\u622a",children:"19.4.13 \u8bf7\u6c42\u62e6\u622a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/".OnRequesting((client, req) => {\r\n // req \u4e3a HttpRequestMessage \u5bf9\u8c61\r\n // \u8ffd\u52a0\u66f4\u591a\u53c2\u6570\r\n req.AppendQueries(new Dictionary<string, object> {\r\n { "access_token", "xxxx"}\r\n });\r\n});\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsxs)(n.h3,{id:"19414-httpclient-\u62e6\u622a",children:["19.4.14 ",(0,r.jsx)(n.code,{children:"HttpClient"})," \u62e6\u622a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/".OnClientCreating(client => {\r\n // client \u4e3a HttpClient \u5bf9\u8c61\r\n client.Timeout = TimeSpan.FromSeconds(30); // \u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\r\n});\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsx)(n.h3,{id:"19415-\u8bf7\u6c42\u4e4b\u524d\u62e6\u622a",children:"19.4.15 \u8bf7\u6c42\u4e4b\u524d\u62e6\u622a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/".OnRequesting((client, req) => {\r\n // req \u4e3a HttpRequestMessage \u5bf9\u8c61\r\n});\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsx)(n.h3,{id:"19416-\u6210\u529f\u8bf7\u6c42\u62e6\u622a",children:"19.4.16 \u6210\u529f\u8bf7\u6c42\u62e6\u622a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/".OnResponsing((client, res) => {\r\n // res \u4e3a HttpResponseMessage \u5bf9\u8c61\r\n});\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsx)(n.h3,{id:"19417-\u8bf7\u6c42\u5f02\u5e38\u62e6\u622a",children:"19.4.17 \u8bf7\u6c42\u5f02\u5e38\u62e6\u622a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/".OnException((client, res, errors) => {\r\n // res \u4e3a HttpResponseMessage \u5bf9\u8c61\r\n});\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsx)(n.h3,{id:"19418-\u5404\u79cd\u8fd4\u56de\u503c\u5904\u7406",children:"19.4.18 \u5404\u79cd\u8fd4\u56de\u503c\u5904\u7406"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u8fdc\u7a0b\u8bf7\u6c42\u9ed8\u8ba4\u63d0\u4f9b\u56db\u79cd\u8fd4\u56de\u503c\u7c7b\u578b\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"HttpResponseMessage"}),"\uff1a\u8bf7\u6c42\u54cd\u5e94\u6d88\u606f\u7c7b\u578b"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"Stream"}),"\uff1a\u6d41\u7c7b\u578b\uff0c\u53ef\u7528\u6765\u4e0b\u8f7d\u6587\u4ef6"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"T"}),"\uff1a\u6cdb\u578b ",(0,r.jsx)(n.code,{children:"T"})," \u7c7b\u578b"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"String"}),"\uff1a\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u4e5f\u5c31\u662f\u76f4\u63a5\u5c06\u7f51\u7edc\u8bf7\u6c42\u7ed3\u679c\u5185\u5bb9\u5b57\u7b26\u4e32\u5316"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"Byte[]"}),"\uff1a\u5b57\u8282\u6570\u7ec4\u7c7b\u578b"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"\u5982\uff1a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// HttpResponseMessage\r\nvar res = await "http://furion.baiqian.ltd/".GetAsync();\r\n\r\n// Stream\uff0c\u53ef\u7528\u6765\u4e0b\u8f7d\u6587\u4ef6\r\nvar (stream, encoding) = await "http://furion.baiqian.ltd/".GetAsStreamAsync();\r\n\r\n// T\r\nvar user = await "http://furion.baiqian.ltd/".GetAsAsync<User>();\r\n\r\n// String\r\nvar str = await "https://www.baidu.com".GetAsStringAsync();\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"19419-\u8bbe\u7f6e-bytestream-\u7c7b\u578b\u4e0a\u4f20\u6587\u4ef6",children:["19.4.19 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Byte[]/Stream"})," \u7c7b\u578b/\u4e0a\u4f20\u6587\u4ef6"]}),"\n",(0,r.jsxs)(n.admonition,{type:"warning",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:[(0,r.jsx)(n.code,{children:"Furion 4.4.0"})," \u4ee5\u4e0b\u7248\u672c"]}),(0,r.jsxs)(n.p,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"Furion 4.4.0+"})," \u7248\u672c\u79fb\u9664\u4e86 ",(0,r.jsx)(n.code,{children:".SetBodyBytes"})," \u65b9\u5f0f\uff0c\u539f\u56e0\u662f\u62d3\u5c55\u6027\u592a\u5dee\uff0c",(0,r.jsxs)(n.strong,{children:["\u65b0\u7248\u672c\u8bf7\u4f7f\u7528 ",(0,r.jsx)(n.code,{children:".SetFiles"})," \u65b9\u5f0f"]}),"\u3002"]})]}),"\n",(0,r.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u4e0a\u4f20\u6587\u4ef6\uff0c\u9700\u8981\u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Content-Type"})," \u4e3a ",(0,r.jsx)(n.code,{children:"multipart/form-data"})," \u7c7b\u578b\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,7,10,15}",children:'// \u652f\u6301\u5355\u6587\u4ef6\uff0cbytes \u53ef\u4ee5\u901a\u8fc7 File.ReadAllBytes(\u6587\u4ef6\u8def\u5f84) \u83b7\u53d6\r\nvar res = await "http://furion.baiqian.ltd/upload".SetContentType("multipart/form-data")\r\n .SetBodyBytes(("\u952e", bytes, "\u6587\u4ef6\u540d")).PostAsync();\r\n\r\n// \u652f\u6301\u591a\u4e2a\u6587\u4ef6\r\nvar res = await "http://furion.baiqian.ltd/upload".SetContentType("multipart/form-data")\r\n .SetBodyBytes(("\u952e", bytes, "\u6587\u4ef6\u540d"),("\u952e", bytes, "\u6587\u4ef6\u540d")).PostAsync();\r\n\r\n// \u652f\u6301\u5355\u6587\u4ef6\uff0cFurion 4.5.8 \u7248\u672c\u652f\u6301 Stream \u65b9\u5f0f\u66f4\u65b0\r\nvar res = await "http://furion.baiqian.ltd/upload".SetContentType("multipart/form-data")\r\n .SetBodyBytes(("\u952e", fileStream, "\u6587\u4ef6\u540d")).PostAsync();\r\n\r\n// \u652f\u6301\u591a\u4e2a\u6587\u4ef6\uff0cFurion 4.5.8 \u7248\u672c\u652f\u6301 Stream \u65b9\u5f0f\u66f4\u65b0\r\nvar res = await "http://furion.baiqian.ltd/upload".SetContentType("multipart/form-data")\r\n .SetBodyBytes(("\u952e", fileStream, "\u6587\u4ef6\u540d"),("\u952e", fileStream, "\u6587\u4ef6\u540d")).PostAsync();\n'})}),"\n",(0,r.jsxs)(n.admonition,{title:"\u5173\u4e8e\u5fae\u4fe1\u4e0a\u4f20\u63a5\u53e3",type:"note",children:[(0,r.jsxs)(n.p,{children:["\u5982\u679c\u9047\u5230\u5fae\u4fe1\u4e0a\u4f20\u51fa\u73b0\u95ee\u9898\uff0c\u5219\u53ef\u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Content-Type"})," \u4e3a\uff1a",(0,r.jsx)(n.code,{children:"application/octet-stream"}),"\uff0c\u5982\uff1a"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'var result = await $"https://api.weixin.qq.com/wxa/img_sec_check?access_token={token}"\r\n .SetBodyBytes(("media", bytes, Path.GetFileName(imgPath)))\r\n .SetContentType("application/octet-stream")\r\n .PostAsStringAsync();\n'})})]}),"\n",(0,r.jsxs)(n.admonition,{type:"tip",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:[(0,r.jsx)(n.code,{children:"Furion 4.4.0+"})," \u7248\u672c"]}),(0,r.jsxs)(n.p,{children:["\u5982\u679c\u4f7f\u7528 ",(0,r.jsx)(n.code,{children:"Furion 4.4.0+"})," \u7248\u672c\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u7684 ",(0,r.jsx)(n.code,{children:".SetFiles"})," \u66ff\u4ee3 ",(0,r.jsx)(n.code,{children:".SetBodyBytes"})," \u64cd\u4f5c\u3002"]})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,7}",children:'// bytes \u53ef\u4ee5\u901a\u8fc7 File.ReadAllBytes(\u6587\u4ef6\u8def\u5f84) \u83b7\u53d6\r\nvar res = await "http://furion.baiqian.ltd/upload".SetContentType("multipart/form-data")\r\n .SetFiles(HttpFile.Create("file", bytes, "image.png")).PostAsync();\r\n\r\n// \u652f\u6301\u591a\u4e2a\u6587\u4ef6\r\nvar res = await "http://furion.baiqian.ltd/upload".SetContentType("multipart/form-data")\r\n .SetFiles(HttpFile.CreateMultiple("files", (bytes, "image1.png"), (bytes, "image2.png"))).PostAsync();\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"19420-\u8bbe\u7f6e-iserviceprovider",children:["19.4.20 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"IServiceProvider"})]}),"\n",(0,r.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u6784\u5efa\u4e00\u4e2a\u4f5c\u7528\u57df\u7684 ",(0,r.jsx)(n.code,{children:"IServiceProvider"}),"\uff0c\u8fd9\u65f6\u53ea\u9700\u8981\u8bbe\u7f6e\u5373\u53ef\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'var res = await "http://furion.baiqian.ltd/upload".SetRequestScoped(services);\n'})}),"\n",(0,r.jsx)(n.h3,{id:"19421-\u652f\u6301\u6a21\u677f\u914d\u7f6e",children:"19.4.21 \u652f\u6301\u6a21\u677f\u914d\u7f6e"}),"\n",(0,r.jsxs)(n.p,{children:["\u6a21\u677f\u683c\u5f0f\u4e3a\uff1a",(0,r.jsx)(n.code,{children:"#(\u914d\u7f6e\u8def\u5f84)"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'var res = await "#(Furion:Address)/upload".GetAsync();\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "Furion": {\r\n "Address": "http://furion.baiqian.ltd"\r\n }\r\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"19422-\u91cd\u8bd5\u7b56\u7565",children:"19.4.22 \u91cd\u8bd5\u7b56\u7565"}),"\n",(0,r.jsxs)(n.p,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"Furion v2.18+"})," \u7248\u672c\u652f\u6301\u914d\u7f6e\u91cd\u8bd5\u7b56\u7565\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'var res = await "http://furion.baiqian.ltd".SetRetryPolicy(3, 1000).GetAsync();\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u4ee5\u4e0a\u4ee3\u7801\u8868\u793a\u8bf7\u6c42\u5931\u8d25\u91cd\u8bd5 ",(0,r.jsx)(n.code,{children:"3"})," \u6b21\uff0c\u6bcf\u6b21\u5ef6\u8fdf ",(0,r.jsx)(n.code,{children:"1000ms"})," \u3002"]}),"\n",(0,r.jsxs)(n.h3,{id:"19423-\u652f\u6301-gzip-\u538b\u7f29",children:["19.4.23 \u652f\u6301 ",(0,r.jsx)(n.code,{children:"GZip"})," \u538b\u7f29"]}),"\n",(0,r.jsxs)(n.p,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"Furion v3.2.0+"})," \u7248\u672c\u652f\u6301",(0,r.jsx)(n.code,{children:"GZip"})," \u538b\u7f29\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'var res = await "http://furion.baiqian.ltd".WithGZip().GetAsync();\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"19424-\u8bbe\u7f6e-url-\u8f6c\u7801",children:["19.4.24 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Url"})," \u8f6c\u7801"]}),"\n",(0,r.jsxs)(n.p,{children:["\u8fc7\u53bb\u7248\u672c\u4f1a\u5bf9\u6240\u6709\u7684 ",(0,r.jsx)(n.code,{children:"Url"})," \u8fdb\u884c ",(0,r.jsx)(n.code,{children:"Uri.EscapeDataString"})," \u8f6c\u7801\uff0c\u5728 ",(0,r.jsx)(n.code,{children:"Furion v3.8.0+"})," \u7248\u672c\u652f\u6301 ",(0,r.jsx)(n.code,{children:"Url"})," \u8f6c\u7801\u8bbe\u7f6e\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'var res = await "http://furion.baiqian.ltd".WithEncodeUrl(false).GetAsync();\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"19425-\u8bbe\u7f6e-http-\u7248\u672c",children:["19.4.25 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"HTTP"})," \u7248\u672c"]}),"\n",(0,r.jsxs)(n.p,{children:["\u53ef\u89e3\u51b3\u4e00\u4e9b ",(0,r.jsx)(n.code,{children:"HTTP"})," \u548c ",(0,r.jsx)(n.code,{children:"HTTPS"})," \u8bf7\u6c42\u95ee\u9898\u3002"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'var res = await "http://furion.baiqian.ltd".SetHttpVersion("1.0").GetAsync(); // Furion 4.8.5.8+ \u652f\u6301\n'})}),"\n",(0,r.jsx)(n.h3,{id:"19426-\u4e0b\u8f7d\u8fdc\u7a0b\u6587\u4ef6\u5e76\u4fdd\u5b58",children:"19.4.26 \u4e0b\u8f7d\u8fdc\u7a0b\u6587\u4ef6\u5e76\u4fdd\u5b58"}),"\n",(0,r.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,r.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,r.jsx)(n.code,{children:"Furion 4.8.7.32 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await "http://furion.baiqian.ltd/img/rm1.png".GetToSaveAsync("D:/rm3.png");\r\nawait "http://furion.baiqian.ltd/img/rm1.png".PostToSaveAsync("D:/rm3.png");\r\n...\n'})}),"\n",(0,r.jsxs)(n.h2,{id:"195-ihttpdispatchproxy-\u4ee3\u7406\u65b9\u5f0f",children:["19.5 ",(0,r.jsx)(n.code,{children:"IHttpDispatchProxy"})," \u4ee3\u7406\u65b9\u5f0f"]}),"\n",(0,r.jsx)(n.h3,{id:"1951-\u652f\u6301\u591a\u79cd\u4ee3\u7406\u65b9\u5f0f",children:"19.5.1 \u652f\u6301\u591a\u79cd\u4ee3\u7406\u65b9\u5f0f"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // \u53d1\u9001 Get \u8bf7\u6c42\r\n [Get("http://furion.baiqian.ltd/get")]\r\n Task<HttpResponseMessage> GetXXXAsync();\r\n\r\n // \u53d1\u9001 Post \u8bf7\u6c42\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync();\r\n\r\n // \u53d1\u9001 Put \u8bf7\u6c42\r\n [Put("http://furion.baiqian.ltd/put")]\r\n Task<HttpResponseMessage> PutXXXAsync();\r\n\r\n // \u53d1\u9001 Delete \u8bf7\u6c42\r\n [Delete("http://furion.baiqian.ltd/delete")]\r\n Task<HttpResponseMessage> DeleteXXXAsync();\r\n\r\n // \u53d1\u9001 Patch \u8bf7\u6c42\r\n [Patch("http://furion.baiqian.ltd/patch")]\r\n Task<HttpResponseMessage> PatchXXXAsync();\r\n\r\n // \u53d1\u9001 Head \u8bf7\u6c42\r\n [Head("http://furion.baiqian.ltd/head")]\r\n Task<HttpResponseMessage> HeadXXXAsync();\r\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"1952-\u8bbe\u7f6e\u5730\u5740\u6a21\u677f",children:"19.5.2 \u8bbe\u7f6e\u5730\u5740\u6a21\u677f"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Get("http://furion.baiqian.ltd/get/{id}?name={name}&number={p.PersonDetail.PhonNumber}")]\r\n Task<HttpResponseMessage> GetXXXAsync(int id, string name, Person p);\r\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u6ce8\uff1a\u6a21\u677f\u66ff\u6362\u533a\u5206\u5927\u5c0f\u5199\u3002"})}),"\n",(0,r.jsx)(n.h3,{id:"1953-\u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934",children:"19.5.3 \u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u8fdc\u7a0b\u8bf7\u6c42\u4ee3\u7406\u6a21\u5f0f\u63d0\u4f9b\u4e09\u79cd\u65b9\u5f0f\u8bbe\u7f6e\u8bf7\u6c42\u62a5\u6587\u5934\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u652f\u6301\u5728\u63a5\u53e3\u4e2d\u58f0\u660e"}),"\n",(0,r.jsx)(n.li,{children:"\u652f\u6301\u5728\u65b9\u6cd5\u4e2d\u58f0\u660e"}),"\n",(0,r.jsx)(n.li,{children:"\u652f\u6301\u5728\u53c2\u6570\u4e2d\u58f0\u660e"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1-2,5,9,12}",children:'[Headers("key","value")]\r\n[Headers("key1","value2")] // \u8bbe\u7f6e\u591a\u4e2a\r\npublic interface IHttp : IHttpDispatchProxy\r\n{\r\n [Get("http://furion.baiqian.ltd/get/{id}?name={name}"), Headers("key2","value2")]\r\n Task<HttpResponseMessage> GetXXXAsync(int id, string name);\r\n\r\n [Get("http://furion.baiqian.ltd")]\r\n Task<HttpResponseMessage> GetXXX2Async(int id, [Headers]string token = default);\r\n\r\n [Get("http://furion.baiqian.ltd")]\r\n Task<HttpResponseMessage> GetXXX2Async(int id, string name, [Headers("\u522b\u540d")]string token = default);\r\n}\n'})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u5982\u9700\u52a8\u6001\u8bbe\u7f6e\uff0c\u53ef\u4f7f\u7528\u4ee5\u4e0b\u65b9\u5f0f\uff08\u6dfb\u52a0\u53c2\u6570\u62e6\u622a\u5668\uff09\uff1a"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // \u901a\u8fc7\u53c2\u6570\u62e6\u622a\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync(string name, [Interceptor(InterceptorTypes.Request)] Action<HttpClient, HttpRequestMessage> action = default);\r\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"\u8c03\u7528\uff1a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3,9,15}",children:'_http.PostXXXAsync("\u767e\u5c0f\u50e7", (client, requestMessage) =>\r\n{\r\n requestMessage.AppendHeaders(new Dictionary<string , object> {\r\n { "Authorization", "Bearer \u4f60\u7684token"},\r\n { "X-Authorization", "Bearer \u4f60\u7684\u5237\u65b0token"}\r\n });\r\n\r\n // \u4e5f\u652f\u6301\u5bf9\u8c61\uff0c\u533f\u540d\u65b9\u5f0f\r\n requestMessage.AppendHeaders(new {\r\n Authorization = "Bearer \u4f60\u7684token",\r\n Others = "\u5176\u4ed6"\r\n });\r\n\r\n // \u4e5f\u53ef\u4ee5\u4f7f\u7528\u539f\u751f\r\n requestMessage.Headers.TryAddWithoutValidation("Authorization", "Bearer \u4f60\u7684token");\r\n requestMessage.Headers.TryAddWithoutValidation("key", "value");\r\n});\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1954-\u8bbe\u7f6e-url-\u5730\u5740\u53c2\u6570",children:["19.5.4 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"URL"})," \u5730\u5740\u53c2\u6570"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,7,10,13,17,21,25}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Get("http://furion.baiqian.ltd/get/{id}?name={name}")]\r\n Task<HttpResponseMessage> GetXXXAsync(int id, string name);\r\n\r\n [Get("http://furion.baiqian.ltd/get/{p.Id}?name={p.Name}")]\r\n Task<HttpResponseMessage> GetXXXAsync(Person p);\r\n\r\n [Get("http://furion.baiqian.ltd/get")]\r\n Task<HttpResponseMessage> GetXXXAsync([QueryString]int id, [QueryString]string name);\r\n\r\n [Get("http://furion.baiqian.ltd/get")]\r\n Task<HttpResponseMessage> GetXXXAsync([QueryString]int id, [QueryString("\u522b\u540d")]string name);\r\n\r\n // Furion 4.8.1.4 \u65b0\u589e [QueryString(Format)] \u914d\u7f6e\u65f6\u95f4\u7c7b\u578b\u683c\u5f0f\u5316\r\n [Get("http://furion.baiqian.ltd/get")]\r\n Task<HttpResponseMessage> GetXXXAsync([QueryString(Format = "yyyy-MM-dd HH:mm:ss")] DateTime queryStartTime, [QueryString(Format = "yyyy-MM-dd HH:mm:ss")] DateTime queryEndTime);\r\n\r\n // Furion 4.8.1.4 \u65b0\u589e [QueryString(Format)] \u914d\u7f6e\u65f6\u95f4\u7c7b\u578b\u683c\u5f0f\u5316\r\n [Get("http://furion.baiqian.ltd/get")]\r\n Task<HttpResponseMessage> GetXXXAsync([QueryString(Format = "yyyy-MM-dd HH:mm:ss")] DateTimeOffset queryStartTime, [QueryString(Format = "yyyy-MM-dd HH:mm:ss")] DateTimeOffset queryEndTime);\r\n\r\n // Furion 4.7.3 \u65b0\u589e IgnoreNullValueQueries \u914d\u7f6e\u5ffd\u7565\u7a7a\u503c\r\n [Get("http://furion.baiqian.ltd/get", IgnoreNullValueQueries = true)]\r\n Task<HttpResponseMessage> GetXXXAsync([QueryString]int id, [QueryString]string name, [QueryString]string nullValue);\r\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u6700\u7ec8\u8f93\u51fa\u683c\u5f0f\u4e3a\uff1a",(0,r.jsx)(n.code,{children:"http://furion.baiqian.ltd/get?id=1&name=Furion"}),"\u3002"]}),"\n",(0,r.jsxs)(n.admonition,{title:"\u5173\u4e8e\u5bf9\u8c61\u7c7b\u578b\u76f4\u63a5\u4f5c\u4e3a\u6a21\u677f\u53c2\u6570",type:"tip",children:[(0,r.jsxs)(n.p,{children:["\u5728\u5bf9\u63a5\u67d0\u4e9b\u7b2c\u4e09\u65b9\u63a5\u53e3\u7684\u65f6\u5019\u53ef\u80fd\u9047\u5230\u4e00\u79cd\u60c5\u51b5\uff0c\u9700\u8981\u628a\u5bf9\u8c61\u5e8f\u5217\u5316\u6216\u8005\u8fdb\u884c\u67d0\u79cd\u5904\u7406\u540e\u4f5c\u4e3a ",(0,r.jsx)(n.code,{children:"Url"})," \u53c2\u6570\uff0c\u5982\uff1a"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1}",children:'[Get("http://furion.baiqian.ltd/get?json={p}", WithEncodeUrl = false)] // \u8fd9\u91cc\u5c06 p \u4f5c\u4e3a\u6a21\u677f\u4f20\u5165\r\nTask<HttpResponseMessage> GetXXXAsync(Person p);\n'})}),(0,r.jsxs)(n.p,{children:["\u5982\u679c ",(0,r.jsx)(n.code,{children:"Person"})," \u7c7b\u578b\u4e0d\u505a\u4efb\u4f55\u5904\u7406\uff0c\u90a3\u4e48\u6700\u7ec8\u4f20\u9012\u7684\u662f ",(0,r.jsx)(n.code,{children:"Person"})," \u7684\u547d\u540d\u7a7a\u95f4\uff1a",(0,r.jsx)(n.code,{children:"http://furion.baiqian.ltd/get?json=YourProject.Person"}),"\uff0c\u4f46\u8fd9\u5e76\u975e\u662f\u6211\u4eec\u7684\u9884\u671f\u3002"]}),(0,r.jsxs)(n.p,{children:["\u8fd9\u4e2a\u65f6\u5019\u6211\u4eec\u53ea\u9700\u8981\u91cd\u5199 ",(0,r.jsx)(n.code,{children:"Person"})," \u7684 ",(0,r.jsx)(n.code,{children:"ToString"})," \u65b9\u6cd5\u5373\u53ef\uff0c\u5982\uff1a"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5-8}",children:"public class Person\r\n{\r\n public string Name { get; set; }\r\n\r\n public override string ToString()\r\n {\r\n return JsonSerializer.Serialize(this); // \u6bd4\u5982\u8fd9\u91cc\u505a\u5e8f\u5217\u5316\u5904\u7406\r\n // \u5982\u679c\u57fa\u7c7b\u4e2d override\uff0c\u53ef\u4f7f\u7528 return JsonSerializer.Serialize<object>(this);\r\n }\r\n}\n"})})]}),"\n",(0,r.jsx)(n.h3,{id:"1955-\u8bbe\u7f6e\u8bf7\u6c42\u5ba2\u6237\u7aef",children:"19.5.5 \u8bbe\u7f6e\u8bf7\u6c42\u5ba2\u6237\u7aef"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"\u5168\u5c40\u914d\u7f6e\u65b9\u5f0f"})}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3-4,12,15}",children:'services.AddRemoteRequest(options=>\r\n{\r\n // \u914d\u7f6e Github \u57fa\u672c\u4fe1\u606f\r\n options.AddHttpClient("github", c =>\r\n {\r\n c.BaseAddress = new Uri("https://api.github.com/");\r\n c.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json");\r\n c.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample");\r\n });\r\n});\r\n\r\n[Client("github")] // \u53ef\u4ee5\u5728\u63a5\u53e3\u4e2d\u5168\u5c40\u4f7f\u7528\r\npublic interface IHttp : IHttpDispatchProxy\r\n{\r\n [Get("get"), Client("github")] // \u4e5f\u53ef\u4ee5\u5728\u65b9\u6cd5\u4e2d\u5c40\u90e8\u4f7f\u7528\r\n Task<HttpResponseMessage> GetXXXAsync();\r\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u6700\u7ec8\u751f\u6210\u8bf7\u6c42\u5730\u5740\u4e3a\uff1a",(0,r.jsx)(n.code,{children:"https://api.github.com/get"}),"\u3002"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"\u5c40\u90e8\u914d\u7f6e\u65b9\u5f0f"})}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,r.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,r.jsx)(n.code,{children:"Furion 4.3.8 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,7-11}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // \u5c40\u90e8\u65b9\u5f0f\r\n [Get("get")]\r\n Task<HttpResponseMessage> GetXXXAsync([Interceptor(InterceptorTypes.Initiate)]Func<HttpClient> clientProvider);\r\n\r\n // \u5168\u5c40\u9759\u6001\u65b9\u5f0f\r\n [Interceptor(InterceptorTypes.Initiate)]\r\n static HttpClient CreateHttpClient()\r\n {\r\n return new HttpClient(...);\r\n }\r\n}\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1956-\u8bbe\u7f6e-body-\u53c2\u6570",children:["19.5.6 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Body"})," \u53c2\u6570"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,6,9}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Body]User user);\r\n\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Body("application/x-www-form-urlencoded")]User user);\r\n\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Body("application/x-www-form-urlencoded", "UTF-8")]User user);\r\n}\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1957-\u8bbe\u7f6e-json-\u5e8f\u5217\u5316\u63d0\u4f9b\u7a0b\u5e8f",children:["19.5.7 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u63d0\u4f9b\u7a0b\u5e8f"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u9ed8\u8ba4\u60c5\u51b5\u4e0b\u91c7\u7528 ",(0,r.jsx)(n.code,{children:"System.Text.Json"})," \u8fdb\u884c ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u5904\u7406\uff0c\u5982\u9700\u8bbe\u7f6e\u7b2c\u4e09\u65b9 ",(0,r.jsx)(n.code,{children:"JSON"})," \u63d0\u4f9b\u5668\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u914d\u7f6e\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,6-7}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd/post"), JsonSerialization(typeof(NewtonsoftJsonSerializerProvider))]\r\n Task<HttpResponseMessage> PostXXXAsync([Body]User user);\r\n\r\n [Post("http://furion.baiqian.ltd/post"), JsonSerialization(typeof(NewtonsoftJsonSerializerProvider))]\r\n Task<HttpResponseMessage> PostXXXAsync([Body]User user, [JsonSerializerOptions]object jsonSerializerOptions = default);\r\n\r\n /// <summary>\r\n /// \u7f3a\u7701\u5e8f\u5217\u5316\u914d\u7f6e\r\n /// </summary>\r\n /// <returns></returns>\r\n [JsonSerializerOptions]\r\n static object GetJsonSerializerOptions()\r\n {\r\n // \u8fd9\u91cc\u4e5f\u53ef\u4ee5\u901a\u8fc7 JSON.GetSerializerOptions<JsonSerializerOptions>() \u83b7\u53d6 Startup.cs \u4e2d\u7684\u914d\u7f6e\r\n return new JsonSerializerOptions\r\n {\r\n\r\n };\r\n }\r\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"[JsonSerializerOptions]"})," \u53ef\u4ee5\u6807\u8bb0\u53c2\u6570\u662f\u4e00\u4e2a ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u914d\u7f6e\u53c2\u6570\u3002"]}),"\n",(0,r.jsxs)(n.admonition,{type:"important",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:["\u5173\u4e8e ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u63d0\u4f9b\u5668"]}),(0,r.jsxs)(n.p,{children:["\u5982\u9700\u4e86\u89e3\u66f4\u591a ",(0,r.jsx)(n.code,{children:"JSON"})," \u5e8f\u5217\u5316\u77e5\u8bc6\u53ef\u67e5\u9605 ",(0,r.jsx)(n.a,{href:"json-serialization#2351-%E8%87%AA%E5%AE%9A%E4%B9%89%E5%BA%8F%E5%88%97%E5%8C%96%E6%8F%90%E4%BE%9B%E5%99%A8",children:"23. JSON \u5e8f\u5217\u5316"})," \u7ae0\u8282"]})]}),"\n",(0,r.jsx)(n.h3,{id:"1958-\u53c2\u6570\u9a8c\u8bc1",children:"19.5.8 \u53c2\u6570\u9a8c\u8bc1"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,7}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Range(1,10)]int id, [Required, MaxLength(10)]string name);\r\n\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Required]User user); // \u5bf9\u8c61\u7c7b\u578b\u652f\u6301\u5c5e\u6027\u914d\u7f6e\u7279\u6027\u9a8c\u8bc1\r\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"1959-\u8bf7\u6c42\u62e6\u622a",children:"19.5.9 \u8bf7\u6c42\u62e6\u622a"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u8fdc\u7a0b\u8bf7\u6c42\u4ee3\u7406\u65b9\u5f0f\u63d0\u4f9b\u4e24\u79cd\u62e6\u622a\u65b9\u5f0f\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u63a5\u53e3\u9759\u6001\u65b9\u6cd5\u62e6\u622a"}),"\n",(0,r.jsx)(n.li,{children:"\u53c2\u6570\u6807\u8bb0\u62e6\u622a"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,8,18}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // \u901a\u8fc7\u53c2\u6570\u62e6\u622a\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Interceptor(InterceptorTypes.Request)] Action<HttpClient, HttpRequestMessage> action = default);\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Request)]\r\n static void OnRequesting1(HttpClient client, HttpRequestMessage req)\r\n {\r\n // \u8ffd\u52a0\u66f4\u591a\u53c2\u6570\r\n req.AppendQueries(new Dictionary<string, object> {\r\n { "access_token", "xxxx"}\r\n });\r\n }\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Request)]\r\n static void OnRequesting2(HttpClient client, HttpRequestMessage req)\r\n {\r\n\r\n }\r\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsxs)(n.h3,{id:"19510-httpclient-\u62e6\u622a",children:["19.5.10 ",(0,r.jsx)(n.code,{children:"HttpClient"})," \u62e6\u622a"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u8fdc\u7a0b\u8bf7\u6c42\u4ee3\u7406\u65b9\u5f0f\u63d0\u4f9b\u4e24\u79cd\u62e6\u622a\u65b9\u5f0f\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u63a5\u53e3\u9759\u6001\u65b9\u6cd5\u62e6\u622a"}),"\n",(0,r.jsx)(n.li,{children:"\u53c2\u6570\u6807\u8bb0\u62e6\u622a"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,8,15}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // \u901a\u8fc7\u53c2\u6570\u62e6\u622a\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Interceptor(InterceptorTypes.Client)] Action<HttpClient> action = default);\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Client)]\r\n static void onClientCreating1(HttpClient client)\r\n {\r\n\r\n }\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Client)]\r\n static void onClientCreating2(HttpClient client)\r\n {\r\n\r\n }\r\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsx)(n.h3,{id:"19511-\u8bf7\u6c42\u4e4b\u524d\u62e6\u622a",children:"19.5.11 \u8bf7\u6c42\u4e4b\u524d\u62e6\u622a"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u8fdc\u7a0b\u8bf7\u6c42\u4ee3\u7406\u65b9\u5f0f\u63d0\u4f9b\u4e24\u79cd\u62e6\u622a\u65b9\u5f0f\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u63a5\u53e3\u9759\u6001\u65b9\u6cd5\u62e6\u622a"}),"\n",(0,r.jsx)(n.li,{children:"\u53c2\u6570\u6807\u8bb0\u62e6\u622a"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,8,15}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // \u901a\u8fc7\u53c2\u6570\u62e6\u622a\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Interceptor(InterceptorTypes.Request)] Action<HttpClient, HttpRequestMessage> action = default);\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Request)]\r\n static void OnRequest1(HttpClient client, HttpRequestMessage req)\r\n {\r\n\r\n }\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Request)]\r\n static void OnRequest2(HttpClient client, HttpRequestMessage req)\r\n {\r\n\r\n }\r\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsx)(n.h3,{id:"19512-\u6210\u529f\u8bf7\u6c42\u62e6\u622a",children:"19.5.12 \u6210\u529f\u8bf7\u6c42\u62e6\u622a"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u8fdc\u7a0b\u8bf7\u6c42\u4ee3\u7406\u65b9\u5f0f\u63d0\u4f9b\u4e24\u79cd\u62e6\u622a\u65b9\u5f0f\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u63a5\u53e3\u9759\u6001\u65b9\u6cd5\u62e6\u622a"}),"\n",(0,r.jsx)(n.li,{children:"\u53c2\u6570\u6807\u8bb0\u62e6\u622a"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,8,15}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // \u901a\u8fc7\u53c2\u6570\u62e6\u622a\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Interceptor(InterceptorTypes.Response)] Action<HttpClient, HttpResponseMessage> action = default);\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Response)]\r\n static void OnResponsing1(HttpClient client, HttpResponseMessage res)\r\n {\r\n\r\n }\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Response)]\r\n static void OnResponsing2(HttpClient client, HttpResponseMessage res)\r\n {\r\n\r\n }\r\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsx)(n.h3,{id:"19513-\u8bf7\u6c42\u5f02\u5e38\u62e6\u622a",children:"19.5.13 \u8bf7\u6c42\u5f02\u5e38\u62e6\u622a"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u8fdc\u7a0b\u8bf7\u6c42\u4ee3\u7406\u65b9\u5f0f\u63d0\u4f9b\u4e24\u79cd\u62e6\u622a\u65b9\u5f0f\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u63a5\u53e3\u9759\u6001\u65b9\u6cd5\u62e6\u622a"}),"\n",(0,r.jsx)(n.li,{children:"\u53c2\u6570\u6807\u8bb0\u62e6\u622a"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,8,15}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // \u901a\u8fc7\u53c2\u6570\u62e6\u622a\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync([Interceptor(InterceptorTypes.Exception)] Action<HttpClient, HttpResponseMessage, string> action = default);\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Exception)]\r\n static void OnException1(HttpClient client, HttpResponseMessage res, string errors)\r\n {\r\n\r\n }\r\n\r\n // \u5168\u5c40\u62e6\u622a\uff0c\u7c7b\u4e2d\u6bcf\u4e00\u4e2a\u65b9\u6cd5\u90fd\u4f1a\u89e6\u53d1\r\n [Interceptor(InterceptorTypes.Exception)]\r\n static void OnException2(HttpClient client, HttpResponseMessage res, string errors)\r\n {\r\n\r\n }\r\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u652f\u6301\u591a\u6b21\u62e6\u622a"})}),"\n",(0,r.jsx)(n.h3,{id:"19514-\u5404\u79cd\u8fd4\u56de\u503c\u5904\u7406",children:"19.5.14 \u5404\u79cd\u8fd4\u56de\u503c\u5904\u7406"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u8fdc\u7a0b\u8bf7\u6c42\u9ed8\u8ba4\u63d0\u4f9b\u56db\u79cd\u8fd4\u56de\u503c\u7c7b\u578b\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"HttpResponseMessage"}),"\uff1a\u8bf7\u6c42\u54cd\u5e94\u6d88\u606f\u7c7b\u578b"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"Stream"}),"\uff1a\u6d41\u7c7b\u578b\uff0c\u53ef\u7528\u6765\u4e0b\u8f7d\u6587\u4ef6"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"T"}),"\uff1a\u6cdb\u578b ",(0,r.jsx)(n.code,{children:"T"})," \u7c7b\u578b"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"String"}),"\uff1a\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u4e5f\u5c31\u662f\u76f4\u63a5\u5c06\u7f51\u7edc\u8bf7\u6c42\u7ed3\u679c\u5185\u5bb9\u5b57\u7b26\u4e32\u5316"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"\u5982\uff1a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n // HttpResponseMessage\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<HttpResponseMessage> PostXXXAsync();\r\n\r\n // Stream\uff0c\u53ef\u7528\u6765\u4e0b\u8f7d\u6587\u4ef6\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<Stream> PostXXXAsync();\r\n\r\n // T\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<User> PostXXXAsync();\r\n\r\n // String\r\n [Post("http://furion.baiqian.ltd/post")]\r\n Task<string> PostXXXAsync();\r\n}\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"19515-\u8bbe\u7f6e-bytestream-\u7c7b\u578b\u4e0a\u4f20\u6587\u4ef6",children:["19.5.15 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Byte[]/Stream"})," \u7c7b\u578b/\u4e0a\u4f20\u6587\u4ef6"]}),"\n",(0,r.jsxs)(n.admonition,{type:"warning",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:[(0,r.jsx)(n.code,{children:"Furion 4.4.0"})," \u4ee5\u4e0b\u7248\u672c"]}),(0,r.jsxs)(n.p,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"Furion 4.4.0+"})," \u7248\u672c\u79fb\u9664\u4e86 ",(0,r.jsx)(n.code,{children:"[BodyBytes]"})," \u65b9\u5f0f\uff0c\u539f\u56e0\u662f\u62d3\u5c55\u6027\u592a\u5dee\uff0c",(0,r.jsxs)(n.strong,{children:["\u65b0\u7248\u672c\u8bf7\u4f7f\u7528 ",(0,r.jsx)(n.code,{children:"HttpFile"})," \u65b9\u5f0f"]}),"\u3002"]})]}),"\n",(0,r.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u4e0a\u4f20\u6587\u4ef6\uff0c\u9700\u8981\u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Content-Type"})," \u4e3a ",(0,r.jsx)(n.code,{children:"multipart/form-data"})," \u7c7b\u578b\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,4}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd/upload", ContentType = "multipart/form-data")] // bytes \u53ef\u4ee5\u901a\u8fc7 File.ReadAllBytes(\u6587\u4ef6\u8def\u5f84) \u83b7\u53d6\r\n Task<HttpResponseMessage> PostXXXAsync([BodyBytes("\u952e","\u6587\u4ef6\u540d")]Byte[] bytes);\r\n\r\n // \u652f\u6301\u591a\u4e2a\u6587\u4ef6\r\n [Post("http://furion.baiqian.ltd/upload", ContentType = "multipart/form-data")] // bytes \u53ef\u4ee5\u901a\u8fc7 File.ReadAllBytes(\u6587\u4ef6\u8def\u5f84) \u83b7\u53d6\r\n Task<HttpResponseMessage> PostXXXAsync([BodyBytes("\u952e","\u6587\u4ef6\u540d")]Byte[] bytes,[BodyBytes("\u952e","\u6587\u4ef6\u540d")]Byte[] bytes2);\r\n}\n'})}),"\n",(0,r.jsxs)(n.admonition,{type:"tip",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:[(0,r.jsx)(n.code,{children:"Furion 4.4.0+"})," \u7248\u672c"]}),(0,r.jsxs)(n.p,{children:["\u5982\u679c\u4f7f\u7528 ",(0,r.jsx)(n.code,{children:"Furion 4.4.0+"})," \u7248\u672c\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u7684 ",(0,r.jsx)(n.code,{children:"HttpFile"})," \u66ff\u4ee3 ",(0,r.jsx)(n.code,{children:"[BodyBytes]"})," \u64cd\u4f5c\u3002\u8bf7\u6c42\u6709\u989d\u5916\u53c2\u6570\u65f6 ",(0,r.jsx)(n.code,{children:"HttpFile"})," \u5fc5\u987b\u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"fileName"})," \u503c\u3002"]})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3-4,7-8,11-12,15-16}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd/upload", ContentType = "multipart/form-data")]\r\n Task<HttpResponseMessage> PostXXXAsync(HttpFile file);\r\n\r\n\r\n [Post("http://furion.baiqian.ltd/upload", ContentType = "multipart/form-data")]\r\n Task<HttpResponseMessage> PostXXXAsync(HttpFile file, [Body("multipart/form-data")]User user);\r\n\r\n // \u652f\u6301\u591a\u4e2a\u6587\u4ef6\r\n [Post("http://furion.baiqian.ltd/upload", ContentType = "multipart/form-data")]\r\n Task<HttpResponseMessage> PostXXXAsync(HttpFile[] files);\r\n\r\n // \u652f\u6301\u591a\u4e2a\u6587\u4ef6\r\n [Post("http://furion.baiqian.ltd/upload", ContentType = "multipart/form-data")]\r\n Task<HttpResponseMessage> PostXXXAsync(IList<HttpFile> files);\r\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"19516-\u652f\u6301\u6a21\u677f\u914d\u7f6e",children:"19.5.16 \u652f\u6301\u6a21\u677f\u914d\u7f6e"}),"\n",(0,r.jsxs)(n.p,{children:["\u6a21\u677f\u683c\u5f0f\u4e3a\uff1a",(0,r.jsx)(n.code,{children:"#(\u914d\u7f6e\u8def\u5f84)"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("#(Furion:Address)/upload")]\r\n Task<HttpResponseMessage> PostXXXAsync([Body]User user);\r\n}\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "Furion": {\r\n "Address": "http://furion.baiqian.ltd"\r\n }\r\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"\u65b9\u6cd5\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8e\u63a5\u53e3\u5b9a\u4e49\u7684\u4f18\u5148\u7ea7\u3002"}),"\n",(0,r.jsx)(n.h3,{id:"19517-\u91cd\u8bd5\u7b56\u7565",children:"19.5.17 \u91cd\u8bd5\u7b56\u7565"}),"\n",(0,r.jsxs)(n.p,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"Furion v2.18+"})," \u7248\u672c\u652f\u6301\u914d\u7f6e\u91cd\u8bd5\u7b56\u7565\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'[RetryPolicy(3, 1000)] // \u652f\u6301\u5168\u5c40\r\npublic interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd"), RetryPolicy(3, 1000)] // \u652f\u6301\u5c40\u90e8\r\n Task<HttpResponseMessage> PostXXXAsync([Body]User user);\r\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u4ee5\u4e0a\u4ee3\u7801\u8868\u793a\u8bf7\u6c42\u5931\u8d25\u91cd\u8bd5 ",(0,r.jsx)(n.code,{children:"3"})," \u6b21\uff0c\u6bcf\u6b21\u5ef6\u8fdf ",(0,r.jsx)(n.code,{children:"1000ms"})," \u3002"]}),"\n",(0,r.jsxs)(n.h3,{id:"19518-\u652f\u6301-gzip",children:["19.5.18 \u652f\u6301 ",(0,r.jsx)(n.code,{children:"GZip"})]}),"\n",(0,r.jsxs)(n.p,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"Furion v3.2.0+"})," \u7248\u672c\u652f\u6301 ",(0,r.jsx)(n.code,{children:"GZip"}),"\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd", WithGZip = true)]\r\n Task<HttpResponseMessage> PostXXXAsync([Body]User user);\r\n}\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"19519-\u8bbe\u7f6e-url-\u8f6c\u7801",children:["19.5.19 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"Url"})," \u8f6c\u7801"]}),"\n",(0,r.jsxs)(n.p,{children:["\u8fc7\u53bb\u7248\u672c\u4f1a\u5bf9\u6240\u6709\u7684 ",(0,r.jsx)(n.code,{children:"Url"})," \u8fdb\u884c ",(0,r.jsx)(n.code,{children:"Uri.EscapeDataString"})," \u8f6c\u7801\uff0c\u5728 ",(0,r.jsx)(n.code,{children:"Furion v3.8.0+"})," \u7248\u672c\u652f\u6301 ",(0,r.jsx)(n.code,{children:"Url"})," \u8f6c\u7801\u8bbe\u7f6e\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd", WithEncodeUrl = false)]\r\n Task<HttpResponseMessage> PostXXXAsync([Body]User user);\r\n}\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"19520-\u8bbe\u7f6e-http-\u7248\u672c",children:["19.5.20 \u8bbe\u7f6e ",(0,r.jsx)(n.code,{children:"HTTP"})," \u7248\u672c"]}),"\n",(0,r.jsxs)(n.p,{children:["\u53ef\u89e3\u51b3\u4e00\u4e9b ",(0,r.jsx)(n.code,{children:"HTTP"})," \u548c ",(0,r.jsx)(n.code,{children:"HTTPS"})," \u8bf7\u6c42\u95ee\u9898\u3002"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Post("http://furion.baiqian.ltd", HttpVersion = "1.1")]\r\n Task<HttpResponseMessage> PostXXXAsync([Body]User user);\r\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"196-\u8bf7\u6c42\u5ba2\u6237\u7aef\u914d\u7f6e",children:"19.6 \u8bf7\u6c42\u5ba2\u6237\u7aef\u914d\u7f6e"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u4e5f\u63d0\u4f9b\u4e86\u591a\u4e2a\u8bf7\u6c42\u5ba2\u6237\u7aef\u914d\u7f6e\uff0c\u53ef\u4ee5\u4e3a\u591a\u4e2a\u5ba2\u6237\u7aef\u8bf7\u6c42\u914d\u7f6e\u9ed8\u8ba4\u8bf7\u6c42\u4fe1\u606f\uff0c\u76ee\u524d\u652f\u6301\u56db\u79cd\u6a21\u5f0f\u8fdb\u884c\u914d\u7f6e\u3002"]}),"\n",(0,r.jsxs)(n.h3,{id:"1961-startupcs-\u7edf\u4e00\u914d\u7f6e",children:["19.6.1 ",(0,r.jsx)(n.code,{children:"Startup.cs"})," \u7edf\u4e00\u914d\u7f6e"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,9}",children:'services.AddRemoteRequest(options=>\r\n{\r\n // \u914d\u7f6e\u9ed8\u8ba4 HttpClient\r\n options.AddHttpClient(string.Empty, c => {\r\n // \u5176\u4ed6\u914d\u7f6e\r\n });\r\n\r\n // \u914d\u7f6e\u7279\u5b9a\u5ba2\u6237\u7aef\r\n options.AddHttpClient("github", c =>\r\n {\r\n c.BaseAddress = new Uri("https://api.github.com/");\r\n c.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json");\r\n c.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample");\r\n });\r\n})\n'})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"\u914d\u7f6e\u4e86\u547d\u540d\u5ba2\u6237\u7aef\u540e\uff0c\u6bcf\u6b21\u8bf7\u6c42\u90fd\u4f1a\u81ea\u52a8\u52a0\u4e0a\u8fd9\u4e9b\u914d\u7f6e\u3002"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"\u4ee3\u7406\u8bf7\u6c42"})," \u4f7f\u7528"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,7}",children:'// \u5728\u63a5\u53e3\u5b9a\u4e49\u4e2d\u4f7f\u7528\r\n[Client("github")]\r\npublic interface IHttp: IHttpDispatchProxy\r\n{\r\n}\r\n\r\n// \u5728\u65b9\u6cd5\u4e2d\u4f7f\u7528\r\n[Get("api/getdata"), Client("github")]\r\nTask<User> GetData();\r\n\r\n[Put("api/getdata"), Client("facebook")]\r\nTask<User> GetData();\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"\u5b57\u7b26\u4e32\u62d3\u5c55"})," \u4f7f\u7528"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u8bbe\u7f6e\u8bf7\u6c42\u62e6\u622a\r\nvar response = await "http://47.100.247.61/api/sysdata/categories".SetClient("github").PostAsync();\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"IHttpClientFactory"})," \u4e2d\u4f7f\u7528"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,13}",children:'public class ValuesController : Controller\r\n{\r\n private readonly IHttpClientFactory _httpClientFactory;\r\n\r\n public ValuesController(IHttpClientFactory httpClientFactory)\r\n {\r\n _httpClientFactory = httpClientFactory;\r\n }\r\n\r\n [HttpGet]\r\n public async Task<ActionResult> Get()\r\n {\r\n var client = _httpClientFactory.CreateClient("github");\r\n string result = await client.GetStringAsync("/");\r\n return Ok(result);\r\n }\r\n}\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1962-\u914d\u7f6e\u5ba2\u6237\u7aef-timeout",children:["19.6.2 \u914d\u7f6e\u5ba2\u6237\u7aef ",(0,r.jsx)(n.code,{children:"Timeout"})]}),"\n",(0,r.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,r.jsx)(n.code,{children:"HttpClient"})," \u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4\u4e3a ",(0,r.jsx)(n.code,{children:"100\u79d2"}),"\uff0c\u53ef\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u8bbe\u7f6e\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,10}",children:'// \u914d\u7f6e\u9ed8\u8ba4 HttpClient\r\noptions.AddHttpClient(string.Empty, c =>\r\n{\r\n c.Timeout = TimeSpan.FromMinutes(2);\r\n});\r\n\r\n// \u914d\u7f6e\u7279\u5b9a\u5ba2\u6237\u7aef\r\noptions.AddHttpClient("github", c =>\r\n{\r\n c.Timeout = TimeSpan.FromMinutes(2);\r\n});\n'})}),"\n",(0,r.jsx)(n.h3,{id:"1963-\u914d\u7f6e\u5ba2\u6237\u7aef\u751f\u5b58\u671f",children:"19.6.3 \u914d\u7f6e\u5ba2\u6237\u7aef\u751f\u5b58\u671f"}),"\n",(0,r.jsxs)(n.p,{children:["\u6bcf\u6b21\u5bf9 ",(0,r.jsx)(n.code,{children:"IHttpClientFactory"})," \u8c03\u7528 ",(0,r.jsx)(n.code,{children:"CreateClient"})," \u90fd\u4f1a\u8fd4\u56de\u4e00\u4e2a\u65b0 ",(0,r.jsx)(n.code,{children:"HttpClient"})," \u5b9e\u4f8b\u3002 \u6bcf\u4e2a\u547d\u540d\u5ba2\u6237\u7aef\u90fd\u521b\u5efa\u4e00\u4e2a ",(0,r.jsx)(n.code,{children:"HttpMessageHandler"}),"\u3002 \u5de5\u5382\u7ba1\u7406 ",(0,r.jsx)(n.code,{children:"HttpMessageHandler"})," \u5b9e\u4f8b\u7684\u751f\u5b58\u671f\u3002"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"IHttpClientFactory"})," \u5c06\u5de5\u5382\u521b\u5efa\u7684 ",(0,r.jsx)(n.code,{children:"HttpMessageHandler"})," \u5b9e\u4f8b\u6c47\u96c6\u5230\u6c60\u4e2d\uff0c\u4ee5\u51cf\u5c11\u8d44\u6e90\u6d88\u8017\u3002 \u65b0\u5efa ",(0,r.jsx)(n.code,{children:"HttpClient"})," \u5b9e\u4f8b\u65f6\uff0c\u53ef\u80fd\u4f1a\u91cd\u7528\u6c60\u4e2d\u7684 ",(0,r.jsx)(n.code,{children:"HttpMessageHandler"})," \u5b9e\u4f8b\uff08\u5982\u679c\u751f\u5b58\u671f\u5c1a\u672a\u5230\u671f\u7684\u8bdd\uff09\u3002"]}),"\n",(0,r.jsxs)(n.p,{children:["\u5904\u7406\u7a0b\u5e8f\u7684\u9ed8\u8ba4\u751f\u5b58\u671f\u4e3a",(0,r.jsx)(n.strong,{children:"\u4e24\u5206\u949f"}),"\u3002 \u53ef\u5728\u6bcf\u4e2a\u547d\u540d\u5ba2\u6237\u7aef\u4e0a\u91cd\u5199\u9ed8\u8ba4\u503c\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,7}",children:'// \u914d\u7f6e\u9ed8\u8ba4 HttpClient\r\noptions.AddHttpClient(string.Empty, c => { ... })\r\n .SetHandlerLifetime(TimeSpan.FromMinutes(5));\r\n\r\n// \u914d\u7f6e\u7279\u5b9a\u5ba2\u6237\u7aef\r\noptions.AddHttpClient("github", c => { ... })\r\n .SetHandlerLifetime(TimeSpan.FromMinutes(5));\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1964-\u81ea\u5b9a\u4e49-client-\u7c7b\u65b9\u5f0f",children:["19.6.4 \u81ea\u5b9a\u4e49 ",(0,r.jsx)(n.code,{children:"Client"})," \u7c7b\u65b9\u5f0f"]}),"\n",(0,r.jsx)(n.p,{children:"\u6211\u4eec\u53ef\u4ee5\u6309\u7167\u4e00\u5b9a\u7684\u89c4\u5219\u7f16\u5199\u7279\u5b9a\u670d\u52a1\u7684\u8bf7\u6c42\u5ba2\u6237\u7aef\uff0c\u5982\uff1a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3,5}",children:'public class GitHubClient\r\n{\r\n public HttpClient Client { get; private set; }\r\n\r\n public GitHubClient(HttpClient httpClient)\r\n {\r\n httpClient.BaseAddress = new Uri("https://api.github.com/");\r\n httpClient.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json");\r\n httpClient.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample");\r\n Client = httpClient;\r\n }\r\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u7136\u540e\u5728 ",(0,r.jsx)(n.code,{children:"Startup.cs"})," \u4e2d\u6ce8\u518c\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:"services.AddHttpClient<GitHubClient>();\n"})}),"\n",(0,r.jsx)(n.p,{children:"\u4f7f\u7528\u5982\u4e0b\uff1a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,13}",children:'public class ValuesController : Controller\r\n{\r\n private readonly GitHubClient _gitHubClient;;\r\n\r\n public ValuesController(GitHubClient gitHubClient)\r\n {\r\n _gitHubClient = gitHubClient;\r\n }\r\n\r\n [HttpGet]\r\n public async Task<ActionResult> Get()\r\n {\r\n string result = await _gitHubClient.Client.GetStringAsync("/");\r\n return Ok(result);\r\n }\r\n}\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1965-\u81ea\u5b9a\u4e49-client-\u7c7b--\u63a5\u53e3\u65b9\u5f0f",children:["19.6.5 \u81ea\u5b9a\u4e49 ",(0,r.jsx)(n.code,{children:"Client"})," \u7c7b + \u63a5\u53e3\u65b9\u5f0f"]}),"\n",(0,r.jsxs)(n.p,{children:["\u6211\u4eec\u4e5f\u53ef\u4ee5\u5b9a\u4e49\u63a5\u53e3\uff0c\u901a\u8fc7\u63a5\u53e3\u7684\u63d0\u4f9b\u5177\u4f53\u7684\u670d\u52a1 ",(0,r.jsx)(n.code,{children:"API"})," \u64cd\u4f5c\uff0c\u65e0\u9700\u624b\u52a8\u914d\u7f6e ",(0,r.jsx)(n.code,{children:"Url"}),"\uff0c\u5982\u4e0a\u9762\u7684 ",(0,r.jsx)(n.code,{children:'GetStringAsync("/")'}),"\u3002"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3,6,10,18-21}",children:'public interface IGitHubClient\r\n{\r\n Task<string> GetData();\r\n}\r\n\r\npublic class GitHubClient : IGitHubClient\r\n{\r\n private readonly HttpClient _client;\r\n\r\n public GitHubClient(HttpClient httpClient)\r\n {\r\n httpClient.BaseAddress = new Uri("https://api.github.com/");\r\n httpClient.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3+json");\r\n httpClient.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample");\r\n _client = httpClient;\r\n }\r\n\r\n public async Task<string> GetData()\r\n {\r\n return await _client.GetStringAsync("/");\r\n }\r\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u7136\u540e\u5728 ",(0,r.jsx)(n.code,{children:"Startup.cs"})," \u4e2d\u6ce8\u518c\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:"services.AddHttpClient<IGitHubClient, GitHubClient>();\n"})}),"\n",(0,r.jsx)(n.p,{children:"\u4f7f\u7528\uff1a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,13}",children:"public class ValuesController : Controller\r\n{\r\n private readonly IGitHubClient _gitHubClient;;\r\n\r\n public ValuesController(IGitHubClient gitHubClient)\r\n {\r\n _gitHubClient = gitHubClient;\r\n }\r\n\r\n [HttpGet]\r\n public async Task<ActionResult> Get()\r\n {\r\n string result = await _gitHubClient.GetData();\r\n return Ok(result);\r\n }\r\n}\n"})}),"\n",(0,r.jsxs)(n.h3,{id:"1966-httpclient-\u8d85\u65f6\u95ee\u9898",children:["19.6.6 ",(0,r.jsx)(n.code,{children:"HttpClient"})," \u8d85\u65f6\u95ee\u9898"]}),"\n",(0,r.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u4f1a\u9047\u5230 ",(0,r.jsx)(n.code,{children:"HttpClient"})," \u8d85\u65f6\u95ee\u9898\u53ef\u5c1d\u8bd5\u5728 ",(0,r.jsx)(n.code,{children:"Startup.cs"})," \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'AppContext.SetSwitch("System.Net.DisableIPv6",true);\n'})}),"\n",(0,r.jsxs)(n.h2,{id:"197-sslhttps-\u8bc1\u4e66\u914d\u7f6e",children:["19.7 ",(0,r.jsx)(n.code,{children:"SSL/https"})," \u8bc1\u4e66\u914d\u7f6e"]}),"\n",(0,r.jsxs)(n.p,{children:["\u6709\u65f6\u5019\u6211\u4eec\u8bf7\u6c42\u8fdc\u7a0b\u63a5\u53e3\u65f6\u4f1a\u9047\u5230 ",(0,r.jsx)(n.code,{children:"The SSL connection could not be established, see inner exception."})," \u8fd9\u6837\u7684\u9519\u8bef\uff0c\u539f\u56e0\u662f\u8bc1\u4e66\u914d\u7f6e\u4e0d\u6b63\u786e\u95ee\u9898\uff0c\u4e0b\u9762\u6709\u51e0\u79cd\u89e3\u51b3\u65b9\u6cd5\u3002"]}),"\n",(0,r.jsxs)(n.h3,{id:"1971-\u4f7f\u7528\u9ed8\u8ba4-ssl-\u8bc1\u4e66",children:["19.7.1 \u4f7f\u7528\u9ed8\u8ba4 ",(0,r.jsx)(n.code,{children:"SSL"})," \u8bc1\u4e66"]}),"\n",(0,r.jsx)(n.p,{children:"\u5728\u4e00\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u76f4\u63a5\u4f7f\u7528\u9ed8\u8ba4\u8bc1\u4e66\u5373\u53ef\u89e3\u51b3\u95ee\u9898\uff0c\u5982\uff1a"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,7-8,13,15-16}",children:'services.AddRemoteRequest(options=>\r\n{\r\n // \u9ed8\u8ba4 HttpClient \u5728 Furion \u6846\u67b6\u5185\u90e8\u5df2\u7ecf\u914d\u7f6e\u4e86\u8be5\u64cd\u4f5c\r\n options.AddHttpClient(string.Empty)\r\n .ConfigurePrimaryHttpMessageHandler(u => new HttpClientHandler\r\n {\r\n AllowAutoRedirect = true,\r\n UseDefaultCredentials = true\r\n });\r\n\r\n // \u914d\u7f6e\u7279\u5b9a\u5ba2\u6237\u7aef\r\n options.AddHttpClient("github", c => { /*\u5176\u4ed6\u914d\u7f6e*/ })\r\n .ConfigurePrimaryHttpMessageHandler(u => new HttpClientHandler\r\n {\r\n AllowAutoRedirect = true,\r\n UseDefaultCredentials = true\r\n });\r\n});\n'})}),"\n",(0,r.jsxs)(n.h3,{id:"1972-\u5ffd\u7565\u7279\u5b9a\u5ba2\u6237\u7aef-ssl-\u8bc1\u4e66\u68c0\u67e5",children:["19.7.2 \u5ffd\u7565\u7279\u5b9a\u5ba2\u6237\u7aef ",(0,r.jsx)(n.code,{children:"SSL"})," \u8bc1\u4e66\u68c0\u67e5"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,7,12,14}",children:'services.AddRemoteRequest(options=>\r\n{\r\n // \u9ed8\u8ba4 HttpClient \u5728 Furion \u6846\u67b6\u5185\u90e8\u5df2\u7ecf\u914d\u7f6e\u4e86\u8be5\u64cd\u4f5c\r\n options.AddHttpClient(string.Empty)\r\n .ConfigurePrimaryHttpMessageHandler(u => new HttpClientHandler\r\n {\r\n ServerCertificateCustomValidationCallback = (_, _, _, _) => true,\r\n });\r\n\r\n // \u914d\u7f6e\u7279\u5b9a\u5ba2\u6237\u7aef\r\n options.AddHttpClient("github", c => { /*\u5176\u4ed6\u914d\u7f6e*/ })\r\n .ConfigurePrimaryHttpMessageHandler(u => new HttpClientHandler\r\n {\r\n ServerCertificateCustomValidationCallback = (_, _, _, _) => true,\r\n });\r\n});\n'})}),"\n",(0,r.jsxs)(n.admonition,{type:"tip",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:["\u5173\u4e8e ",(0,r.jsx)(n.code,{children:"HttpClientHandler"})," \u548c ",(0,r.jsx)(n.code,{children:"SocketsHttpHandler"})]}),(0,r.jsxs)(n.p,{children:["\u5728 ",(0,r.jsx)(n.code,{children:".NET6"})," \u4e4b\u540e\u9ed8\u8ba4\u4f7f\u7528 ",(0,r.jsx)(n.code,{children:"SocketsHttpHandler "})," \u4f5c\u4e3a\u9ed8\u8ba4\u5e95\u5c42\u7f51\u7edc\u901a\u4fe1\uff0c\u4f46\u6bd4 ",(0,r.jsx)(n.code,{children:"HttpClientHandler"})," \u63d0\u4f9b\u4e86\u66f4\u591a\u5e73\u53f0\u65e0\u5dee\u5f02\u7684\u529f\u80fd\uff0c\u5bf9 ",(0,r.jsx)(n.code,{children:"HttpClientHandler"})," \u7684\u4efb\u4f55\u8bbe\u7f6e\u90fd\u4f1a\u8f6c\u53d1\u5230 ",(0,r.jsx)(n.code,{children:"SocketsHttpHandler"})," \u4e2d\uff0c\u5982\u9700\u4f7f\u7528 ",(0,r.jsx)(n.code,{children:"SocketsHttpHandler"})," \u914d\u7f6e\u53ef\u53c2\u8003\uff1a"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3,5-8}",children:"// \u5ffd\u7565 SSL \u4e0d\u5b89\u5168\u68c0\u67e5\uff0c\u6216 https \u4e0d\u5b89\u5168\u6216 https \u8bc1\u4e66\u6709\u8bef\r\noptions.AddHttpClient(string.Empty)\r\n .ConfigurePrimaryHttpMessageHandler(u => new SocketsHttpHandler\r\n {\r\n SslOptions = new SslClientAuthenticationOptions\r\n {\r\n RemoteCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true\r\n }\r\n });\n"})})]}),"\n",(0,r.jsxs)(n.h3,{id:"1973-\u624b\u52a8\u6307\u5b9a-ssl-\u8bc1\u4e66",children:["19.7.3 \u624b\u52a8\u6307\u5b9a ",(0,r.jsx)(n.code,{children:"SSL"})," \u8bc1\u4e66"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5,8-13}",children:'services.AddRemoteRequest(options=>\r\n{\r\n // \u914d\u7f6e\u7279\u5b9a\u5ba2\u6237\u7aef\r\n options.AddHttpClient("github", c => { /*\u5176\u4ed6\u914d\u7f6e*/ })\r\n .ConfigurePrimaryHttpMessageHandler(u => new HttpClientHandler\r\n {\r\n // \u624b\u52a8\u914d\u7f6e\u8bc1\u4e66\r\n ClientCertificateOptions = ClientCertificateOption.Manual,\r\n ClientCertificates = {\r\n new X509Certificate2("...","..."),\r\n new X509Certificate2("...","..."),\r\n new X509Certificate2("...","...")\r\n }\r\n });\r\n});\n'})}),"\n",(0,r.jsx)(n.h3,{id:"1974-\u5ffd\u7565\u6240\u6709\u5ba2\u6237\u7aef\u8bc1\u4e66\u68c0\u67e5",children:"19.7.4 \u5ffd\u7565\u6240\u6709\u5ba2\u6237\u7aef\u8bc1\u4e66\u68c0\u67e5"}),"\n",(0,r.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,r.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,r.jsx)(n.code,{children:"Furion v3.6.6+"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,4}",children:"services.AddRemoteRequest(options=>\r\n{\r\n // \u9700\u5728\u6240\u6709\u5ba2\u6237\u7aef\u6ce8\u518c\u4e4b\u524d\u6ce8\u518c\r\n options.ApproveAllCerts();\r\n});\n"})}),"\n",(0,r.jsx)(n.h2,{id:"198-\u914d\u7f6e\u5ba2\u6237\u7aef\u8bf7\u6c42\u4ee3\u7406",children:"19.8 \u914d\u7f6e\u5ba2\u6237\u7aef\u8bf7\u6c42\u4ee3\u7406"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,8,10-11,16,18-19}",children:'services.AddRemoteRequest(options =>\r\n{\r\n // \u521b\u5efa Web \u4ee3\u7406\u5bf9\u8c61\r\n var webProxy = new WebProxy(new Uri("http://192.168.31.11:8080"), BypassOnLocal: false);\r\n\r\n // \u9ed8\u8ba4\u5ba2\u6237\u7aef\u914d\u7f6e\r\n options.AddHttpClient(string.Empty)\r\n .ConfigurePrimaryHttpMessageHandler(u => new HttpClientHandler\r\n {\r\n Proxy = webProxy,\r\n UseProxy = true\r\n });\r\n\r\n // \u7279\u5b9a\u5ba2\u6237\u7aef\u914d\u7f6e\r\n options.AddHttpClient("github", c => { /*\u5176\u4ed6\u914d\u7f6e*/ })\r\n .ConfigurePrimaryHttpMessageHandler(u => new HttpClientHandler\r\n {\r\n Proxy = webProxy,\r\n UseProxy = true\r\n });\r\n});\n'})}),"\n",(0,r.jsxs)(n.h2,{id:"199-\u5173\u4e8e\u8fd4\u56de\u503c\u975e-200-\u65f6\u5ffd\u7565-http\u72b6\u6001",children:["19.9 \u5173\u4e8e\u8fd4\u56de\u503c\u975e ",(0,r.jsx)(n.code,{children:"200"})," \u65f6\u5ffd\u7565 ",(0,r.jsx)(n.code,{children:"Http\u72b6\u6001"})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u63d0\u4f9b\u4e86\u975e\u5e38\u65b9\u4fbf\u7684\u8bf7\u6c42\u5e76\u4e14\u5e8f\u5217\u5316\u8bf7\u6c42\u7ed3\u679c ",(0,r.jsx)(n.code,{children:"PostAsAsync<T>"}),"\r\n\u5728 ",(0,r.jsx)(n.code,{children:"2.8.8"})," \u53ca\u4ee5\u4e0b\u7248\u672c\uff0c\u5f53\u8fd4\u56de\u7ed3\u679c\u7684 ",(0,r.jsx)(n.code,{children:"Http"})," \u72b6\u6001\u4e3a\u975e ",(0,r.jsx)(n.code,{children:"200"})," \u65f6\uff0c\u4f1a\u76f4\u63a5\u622a\u65ad\u3002\u8003\u8651\u5230\u8bf7\u6c42\u63a5\u53e3\u7684\u591a\u6837\u6027\uff0c\u5728 ",(0,r.jsx)(n.code,{children:"2.8.9"})," \u53ca\u4ee5\u4e0a\u7248\u672c\u589e\u52a0\u5ffd\u7565\u8fd4\u56de ",(0,r.jsx)(n.code,{children:"Http"})," \u72b6\u6001\uff0c\u76f4\u63a5\u5e8f\u5217\u5316\u7ed3\u679c\u7684\u65b9\u5f0f\u3002"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'// \u8bf7\u6c42\u5e76\u4e14\u5e8f\u5217\u5316\u8bf7\u6c42\u7ed3\u679c\r\nvar result = await "https://api.facebook.com/"\r\n // \u5982\u679c\u4e0d\u52a0 OnException\uff0c\u5219\u4f1a\u76f4\u63a5\u622a\u65ad\r\n .OnException((client, res, errors)=> {\r\n // \u6fc0\u6d3b\u5f02\u6b65\u62e6\u622a \u6b64\u5904\u53ef\u4ee5\u505a\u8bb0\u5f55\u65e5\u5fd7\u64cd\u4f5c \u4e5f\u53ef\u4fdd\u6301\u73b0\u72b6\r\n })\r\n .PostAsAsync<T>();\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"PostAsStringAsync()"})," \u4e5f\u4f7f\u7528\u540c\u6837\u7684 ",(0,r.jsx)(n.code,{children:"OnException"})," \u64cd\u4f5c\u4f7f\u5f97\u5ffd\u7565\u8fd4\u56de ",(0,r.jsx)(n.code,{children:"Http"})," \u72b6\u6001,\u539f\u6837\u8fd4\u56de ",(0,r.jsx)(n.code,{children:"Http"})," \u8bf7\u6c42\u7ed3\u679c"]}),"\n",(0,r.jsx)(n.admonition,{title:"\u7279\u522b\u8bf4\u660e",type:"important",children:(0,r.jsxs)(n.p,{children:["\u5982\u679c\u4e0d\u52a0 ",(0,r.jsx)(n.code,{children:"OnException"}),"\uff0c\u5219\u4f1a\u76f4\u63a5\u622a\u65ad\u3002\r\n\u5982\u679c\u9700\u8981\u590d\u6742\u7684 ",(0,r.jsx)(n.code,{children:"Http Post"})," \u8bf7\u6c42\uff0c\u5efa\u8bae\u76f4\u63a5\u4f7f\u7528 ",(0,r.jsx)(n.code,{children:"PostAsync"}),",\u8fd4\u56de\u503c\u4e3a ",(0,r.jsx)(n.code,{children:"HttpResponseMessage"}),"\uff0c\u53ef\u4ee5\u66f4\u7075\u6d3b\u7684\u63a7\u5236\u7ed3\u679c\u3002"]})}),"\n",(0,r.jsx)(n.h2,{id:"1910-\u5173\u4e8e\u540c\u6b65\u8bf7\u6c42",children:"19.10 \u5173\u4e8e\u540c\u6b65\u8bf7\u6c42"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u5185\u90e8\u9ed8\u8ba4\u4e0d\u63d0\u4f9b\u540c\u6b65\u8bf7\u6c42\u64cd\u4f5c\uff0c\u5efa\u8bae\u603b\u662f\u4f7f\u7528\u5f02\u6b65\u7684\u65b9\u5f0f\u8bf7\u6c42\u3002\u5982\u5728\u4e0d\u80fd\u4f7f\u7528\u5f02\u6b65\u7684\u60c5\u51b5\u4e0b\uff0c\u53ef\u81ea\u884c\u8f6c\u6362\u4e3a\u540c\u6b65\u6267\u884c\u3002\u5982\uff1a"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u5b57\u7b26\u4e32\u62d3\u5c55\u65b9\u5f0f\uff1a"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,4}",children:'var result = "https://api.facebook.com".GetAsync().GetAwaiter().GetResult();\r\n\r\n// \u5982\u679c\u4e0d\u8003\u8651 Task \u5f02\u5e38\u6355\u83b7\uff0c\u53ef\u4ee5\u76f4\u63a5 .Result\r\nvar result = "https://api.facebook.com".GetAsync().Result;\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u4ee3\u7406\u65b9\u5f0f"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {8,11}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Get("https://api.facebook.com")]\r\n Task<HttpResponseMessage> GetAsync();\r\n}\r\n\r\n// \u540c\u6b65\u8c03\u7528\r\nvar result = _http.GetAsync().GetAwaiter().GetResult();\r\n\r\n// \u5982\u679c\u4e0d\u8003\u8651 Task \u5f02\u5e38\u6355\u83b7\uff0c\u53ef\u4ee5\u76f4\u63a5 .Result\r\nvar result = _http.GetAsync().Result;\n'})}),"\n",(0,r.jsxs)(n.h2,{id:"1911-\u9759\u6001-default-\u65b9\u5f0f\u6784\u5efa",children:["19.11 \u9759\u6001 ",(0,r.jsx)(n.code,{children:"Default"})," \u65b9\u5f0f\u6784\u5efa"]}),"\n",(0,r.jsx)(n.p,{children:"\u8fd9\u79cd\u65b9\u5f0f\u6bd4\u5b57\u7b26\u4e32\u62d3\u5c55\u597d\uff0c\u907f\u514d\u4e86\u76f4\u63a5\u5728\u5b57\u7b26\u4e32\u4e0a\u62d3\u5c55\u3002"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'await HttpRequestPart.Default().SetRequestUrl("https://www.baidu.com").GetAsStringAsync();\n'})}),"\n",(0,r.jsxs)(n.h2,{id:"1912-\u5173\u95ed-http-\u8bf7\u6c42\u65e5\u5fd7",children:["19.12 \u5173\u95ed ",(0,r.jsx)(n.code,{children:"Http"})," \u8bf7\u6c42\u65e5\u5fd7"]}),"\n",(0,r.jsxs)(n.p,{children:["\u5728 ",(0,r.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u5e95\u5c42\u4e2d\uff0c",(0,r.jsx)(n.code,{children:"HttpClient"})," \u5bf9\u8c61\u9ed8\u8ba4\u901a\u8fc7 ",(0,r.jsx)(n.code,{children:"IHttpClientFactory"})," \u521b\u5efa\u7684\uff0c\u53ea\u8981\u53d1\u9001\u8bf7\u6c42\u5c31\u4f1a\u81ea\u52a8\u6253\u5370\u65e5\u5fd7\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:"showLineNumbers {13-22}",children:"info: 2022-10-26 11:38:16(+08:00) \u661f\u671f\u4e09 L System.Logging.EventBusService[0] #1\r\n EventBus Hosted Service is running.\r\ninfo: 2022-10-26 11:38:17(+08:00) \u661f\u671f\u4e09 L Microsoft.Hosting.Lifetime[14] #1\r\n Now listening on: https://localhost:5001\r\ninfo: 2022-10-26 11:38:17(+08:00) \u661f\u671f\u4e09 L Microsoft.Hosting.Lifetime[14] #1\r\n Now listening on: http://localhost:5000\r\ninfo: 2022-10-26 11:38:17(+08:00) \u661f\u671f\u4e09 L Microsoft.Hosting.Lifetime[0] #1\r\n Application started. Press Ctrl+C to shut down.\r\ninfo: 2022-10-26 11:38:17(+08:00) \u661f\u671f\u4e09 L Microsoft.Hosting.Lifetime[0] #1\r\n Hosting environment: Development\r\ninfo: 2022-10-26 11:38:17(+08:00) \u661f\u671f\u4e09 L Microsoft.Hosting.Lifetime[0] #1\r\n Content root path: D:\\Workplaces\\OpenSources\\Furion\\samples\\Furion.Web.Entry\\\r\ninfo: 2022-10-26 11:39:00(+08:00) \u661f\u671f\u4e09 L System.Net.Http.HttpClient.Default.LogicalHandler[100] #8\r\n Start processing HTTP request GET https://www.baidu.com/\r\ninfo: 2022-10-26 11:39:00(+08:00) \u661f\u671f\u4e09 L System.Net.Http.HttpClient.Default.ClientHandler[100] #8\r\n Sending HTTP request GET https://www.baidu.com/\r\ninfo: 2022-10-26 11:39:00(+08:00) \u661f\u671f\u4e09 L System.Net.Http.HttpClient.Default.ClientHandler[101] #6\r\n Received HTTP response headers after 288.0665ms - 200\r\ninfo: 2022-10-26 11:39:00(+08:00) \u661f\u671f\u4e09 L System.Net.Http.HttpClient.Default.LogicalHandler[101] #6\r\n End processing HTTP request after 326.1497ms - 200\r\ninfo: 2022-10-26 11:39:04(+08:00) \u661f\u671f\u4e09 L System.Net.Http.HttpClient.Default.LogicalHandler[100] #3\r\n Start processing HTTP request GET https://www.baidu.com/\n"})}),"\n",(0,r.jsxs)(n.p,{children:["\u5982\u9700\u5173\u95ed\u53ea\u9700\u5728 ",(0,r.jsx)(n.code,{children:"appsettings.json"})," \u548c ",(0,r.jsx)(n.code,{children:"appsettings.Development.json"})," \u4e2d\u6dfb\u52a0 ",(0,r.jsx)(n.code,{children:"System.Net.Http.HttpClient"})," \u65e5\u5fd7\u7c7b\u522b\u8fc7\u6ee4\u5373\u53ef\uff0c\u5982\uff1a"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2,7}",children:'{\r\n "Logging": {\r\n "LogLevel": {\r\n "Default": "Information",\r\n "Microsoft.AspNetCore": "Warning",\r\n "Microsoft.EntityFrameworkCore": "Information",\r\n "System.Net.Http.HttpClient": "Warning"\r\n }\r\n }\r\n}\n'})}),"\n",(0,r.jsxs)(n.h2,{id:"1913-\u83b7\u53d6-cookies",children:["19.13 \u83b7\u53d6 ",(0,r.jsx)(n.code,{children:"Cookies"})]}),"\n",(0,r.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,r.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,r.jsx)(n.code,{children:"Furion 4.7.4 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u5b57\u7b26\u4e32\u65b9\u5f0f"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2}",children:'var response = await "http://furion.baiqian.ltd/".GetAsync();\r\nvar cookies = response.GetCookies();\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"\u4ee3\u7406\u65b9\u5f0f"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {4,8}",children:'public interface IHttp : IHttpDispatchProxy\r\n{\r\n [Get("http://furion.baiqian.ltd/")]\r\n Task<HttpResponseMessage> GetAsync();\r\n}\r\n\r\nvar response = await _http.GetAsync();\r\nvar cookies = response.GetCookies();\n'})}),"\n",(0,r.jsxs)(n.admonition,{type:"important",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:["\u91cd\u590d ",(0,r.jsx)(n.code,{children:"Key"})," \u5904\u7406"]}),(0,r.jsxs)(n.p,{children:[(0,r.jsxs)(n.strong,{children:["\u7531\u4e8e ",(0,r.jsx)(n.code,{children:"Cookies"})," \u662f\u652f\u6301\u91cd\u590d ",(0,r.jsx)(n.code,{children:"Key"})," \u7684\uff0c\u6240\u4ee5\u901a\u8fc7\u7d22\u5f15\u65b9\u5f0f\u5982 ",(0,r.jsx)(n.code,{children:"cookies[key]"})," \u4f1a\u629b\u51fa\u5f02\u5e38"]}),"\uff0c\u8fd9\u65f6\u53ef\u4ee5\u901a\u8fc7 ",(0,r.jsx)(n.code,{children:".Lookup()"})," \u8fdb\u884c\u5206\u7ec4\u5904\u7406\u7136\u540e\u8fd4\u56de\u65b0\u7684\u5b57\u5178\u96c6\u5408\uff0c\u5982\uff1a"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1-2,4}",children:'var dicCookies = cookies.ToLookup(u => u.Key, u => u.Value)\r\n .ToDictionary(u => u.Key, u => u.First()); // \u53d6\u91cd\u590d\u7b2c\u4e00\u4e2a .First();\r\n\r\nvar cookie1 = dicCookies["key"];\n'})})]}),"\n",(0,r.jsxs)(n.h2,{id:"1914-\u5728-winformwpf-\u4e2d\u4f7f\u7528",children:["19.14 \u5728 ",(0,r.jsx)(n.code,{children:"WinForm/WPF"})," \u4e2d\u4f7f\u7528"]}),"\n",(0,r.jsxs)(n.p,{children:["\u8fdc\u7a0b\u8bf7\u6c42\u53ef\u5728 ",(0,r.jsx)(n.code,{children:"WinForm/WPF"})," \u4e2d\u4f7f\u7528\uff0c\u53ea\u9700\u8981\u5c06\u65b9\u6cd5/\u4e8b\u4ef6\u6807\u8bb0\u4e3a ",(0,r.jsx)(n.code,{children:"async"})," \u5373\u53ef\u3002"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,3}",children:'private async void button1_Click(object sender, EventArgs e)\r\n{\r\n var result = await "http://furion.baiqian.ltd".GetAsStringAsync();\r\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"1915-\u53cd\u9988\u4e0e\u5efa\u8bae",children:"19.15 \u53cd\u9988\u4e0e\u5efa\u8bae"}),"\n",(0,r.jsx)(n.admonition,{title:"\u4e0e\u6211\u4eec\u4ea4\u6d41",type:"note",children:(0,r.jsxs)(n.p,{children:["\u7ed9 Furion \u63d0 ",(0,r.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/new?issue",children:"Issue"}),"\u3002"]})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.admonition,{title:"\u4e86\u89e3\u66f4\u591a",type:"note",children:(0,r.jsxs)(n.p,{children:["\u60f3\u4e86\u89e3\u66f4\u591a ",(0,r.jsx)(n.code,{children:"HttpClient"})," \u77e5\u8bc6\u53ef\u67e5\u9605 ",(0,r.jsx)(n.a,{href:"https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/http-requests?view=aspnetcore-5.0",children:"ASP.NET Core - HTTP \u8bf7\u6c42"})," \u7ae0\u8282"]})})]})}function x(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},5162:(e,n,t)=>{t.d(n,{Z:()=>l});t(7294);var r=t(4334);const s={tabItem:"tabItem_Ymn6"};var i=t(5893);function l(e){let{children:n,hidden:t,className:l}=e;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.Z)(s.tabItem,l),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>v});var r=t(7294),s=t(4334),i=t(2466),l=t(6550),c=t(469),a=t(1980),d=t(7392),o=t(12);function h(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,d.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[n,t])}function u(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function x(e){let{queryString:n=!1,groupId:t}=e;const s=(0,l.k6)(),i=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,a._X)(i),(0,r.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(s.location.search);n.set(i,e),s.replace({...s.location,search:n.toString()})}),[i,s])]}function j(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,i=p(e),[l,a]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(n){if(!u({value:n,tabValues:t}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:i}))),[d,h]=x({queryString:t,groupId:s}),[j,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,i]=(0,o.Nk)(t);return[s,(0,r.useCallback)((e=>{t&&i.set(e)}),[t,i])]}({groupId:s}),m=(()=>{const e=d??j;return u({value:e,tabValues:i})?e:null})();(0,c.Z)((()=>{m&&a(m)}),[m]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!u({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);a(e),h(e),g(e)}),[h,g,i]),tabValues:i}}var g=t(2389);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var y=t(5893);function b(e){let{className:n,block:t,selectedValue:r,selectValue:l,tabValues:c}=e;const a=[],{blockElementScrollPositionUntilNextRender:d}=(0,i.o5)(),o=e=>{const n=e.currentTarget,t=a.indexOf(n),s=c[t].value;s!==r&&(d(n),l(s))},h=e=>{let n=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":{const t=a.indexOf(e.currentTarget)+1;n=a[t]??a[0];break}case"ArrowLeft":{const t=a.indexOf(e.currentTarget)-1;n=a[t]??a[a.length-1];break}}n?.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":t},n),children:c.map((e=>{let{value:n,label:t,attributes:i}=e;return(0,y.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>a.push(e),onKeyDown:h,onClick:o,...i,className:(0,s.Z)("tabs__item",m.tabItem,i?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function f(e){let{lazy:n,children:t,selectedValue:s}=e;const i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function H(e){const n=j(e);return(0,y.jsxs)("div",{className:(0,s.Z)("tabs-container",m.tabList),children:[(0,y.jsx)(b,{...e,...n}),(0,y.jsx)(f,{...e,...n})]})}function v(e){const n=(0,g.Z)();return(0,y.jsx)(H,{...e,children:h(e.children)},String(n))}},510:(e,n,t)=>{t.d(n,{Z:()=>U});t(7294);const r=(e,n,t)=>e?"string"==typeof e?e:e[n]||t:t;var s=t(5893);const i={display:"block"},l=e=>{let{size:n,color:t,style:l,...c}=e;const a=l?{...i,...l}:i;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:a,...c,children:(0,s.jsx)("path",{d:"M856.4 292.8c-63.3-63.6-126.6-127.1-190.2-190.3-15.3-15.2-32.7-16.1-48.1-0.8-64.3 63.6-128.1 127.6-191.8 191.9-14 14.2-16.3 31.6-1.7 46 14.8 14.7 31.5 10.6 46.1-2.7 5.1-4.6 9.8-9.7 14.7-14.7 39.2-39.7 78.5-79.5 122.8-124.4 0 170 3 332.2-1.1 494-2.4 96.4-91.2 174.6-187.4 176.6-110.6 2.3-198.6-84.4-199-197.4-0.6-136.3-0.2-272.6-0.1-408.9 0-21.8-7.9-37.4-31.2-39.9-18.9-2-33.2 13.2-33.1 37.5 0 145.8-3.4 291.7 2.4 437.2 6 152.1 160.4 263.5 309.5 230.5C591.8 900 672.8 797.2 673.6 664.6c0.8-144 0.2-288.1 0.2-432.1v-33.3c11.2 10.2 17.6 15.4 23.3 21.3 38.5 38.4 76.7 77 115.3 115.2 14.8 14.6 32.2 19.2 47.8 2.9 13.8-14.8 10.3-31.7-3.8-45.8z",fill:r(t,0,"#333333")})})};l.defaultProps={size:18};const c=l,a={display:"block"},d=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...a,...i}:a;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:[(0,s.jsx)("path",{d:"M143.872 768a51.2 51.2 0 0 1-15.36-2.56 51.2 51.2 0 0 1-35.328-51.2V283.136a148.992 148.992 0 0 1 141.824-153.6h450.56a148.992 148.992 0 0 1 141.824 153.6V512a148.992 148.992 0 0 1-141.824 153.6H244.224l-60.928 80.896a51.2 51.2 0 0 1-39.424 21.504zM235.008 180.224a97.792 97.792 0 0 0-90.624 102.4v430.592L218.624 614.4h466.944a97.792 97.792 0 0 0 90.624-102.4V283.136a97.792 97.792 0 0 0-90.624-102.4z",fill:r(t,0,"#333333")}),(0,s.jsx)("path",{d:"M880.128 875.52a51.2 51.2 0 0 1-39.424-20.48l-60.928-80.896h-243.2a25.6 25.6 0 0 1 0-51.2h268.8l76.288 102.4v-295.936a25.6 25.6 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v293.888a51.2 51.2 0 0 1-51.2 51.2z",fill:r(t,1,"#333333")})]})};d.defaultProps={size:18};const o=d,h={display:"block"},p=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...h,...i}:h;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:[(0,s.jsx)("path",{d:"M223.425605 449.2744l161.632237 0 0 253.65714c0 16.954137 13.745049 30.699186 30.699186 30.699186 16.95516 0 30.699186-13.745049 30.699186-30.699186l0-284.356326c0-16.95516-13.744026-30.699186-30.699186-30.699186L291.035446 387.876028l217.23665-248.51605L733.039255 387.580293 607.104031 387.580293c-16.954137 0-30.699186 13.745049-30.699186 30.699186l0 284.652062c0 16.954137 13.745049 30.699186 30.699186 30.699186s30.699186-13.745049 30.699186-30.699186L637.803217 448.978664l164.448376 0c12.140505 0 23.140023-7.154957 28.063149-18.251689 4.922103-11.097756 2.841721-24.053835-5.307889-33.05279L530.62315 72.570829c-5.881964-6.495948-14.273075-10.134825-23.024389-10.091846-8.763594 0.076748-17.076934 3.895727-22.844288 10.494005L200.312188 398.371056c-7.92653 9.067516-9.818623 21.931498-4.839215 32.896224S211.383338 449.2744 223.425605 449.2744z",fill:r(t,0,"#333333")}),(0,s.jsx)("path",{d:"M222.354204 829.113381l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186s-13.745049-30.699186-30.699186-30.699186L222.354204 767.715009c-16.954137 0-30.699186 13.745049-30.699186 30.699186S205.400067 829.113381 222.354204 829.113381z",fill:r(t,1,"#333333")}),(0,s.jsx)("path",{d:"M804.086381 896.729361 222.354204 896.729361c-16.954137 0-30.699186 13.745049-30.699186 30.699186s13.745049 30.699186 30.699186 30.699186l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186S821.041542 896.729361 804.086381 896.729361z",fill:r(t,2,"#333333")})]})};p.defaultProps={size:18};const u=p,x={display:"block"},j=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...x,...i}:x;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:(0,s.jsx)("path",{d:"M380.15463648 874.54223633c0 18.12744166-14.83154297 32.95898463-32.95898463 32.95898463s-32.95898463-14.83154297-32.95898462-32.95898463V228.9152832L172.71078883 370.86962865a33.04467773 33.04467773 0 0 1-46.60400416 0 33.04467773 33.04467773 0 0 1 0-46.6040034l197.55615234-198.14941406A32.76782227 32.76782227 0 0 1 347.0967749 116.52514674c0.03295924 0 0.06591772-0.03295924 0.09887695-0.03295924 1.54907201 0 2.90039088 0.69213867 4.41650366 0.88989258 2.66967773 0.39550781 5.40527318 0.59326172 7.94311548 1.61499049 12.03002904 4.94384766 20.59936549 16.71020508 20.59936549 30.45410156v725.0910642z m320.15698192 23.34155248a32.85351537 32.85351537 0 0 1-23.43383789 9.59106445c-0.03295924 0-0.06591772 0.03295924-0.09887696 0.03295924-1.54907201 0-2.90039088-0.69213867-4.41650365-0.92285182-2.70263697-0.36254857-5.40527318-0.56030248-7.94311549-1.61498972-12.03002904-4.91088842-20.59936549-16.67724584-20.59936473-30.42114309V149.45776367c0-18.12744166 14.83154297-32.95898463 32.95898387-32.95898463s32.95898463 14.83154297 32.95898463 32.95898463v645.60058619l141.52587916-141.92138697c12.81445313-12.82104467 33.81591797-12.82104467 46.63037109 0 12.78808619 12.81445313 12.78808619 33.77636719 0 46.60400416L700.3116184 897.88378881z",fill:r(t,0,"#333333")})})};j.defaultProps={size:18};const g=j,m={display:"block"},y=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...m,...i}:m;return(0,s.jsx)("svg",{viewBox:"0 0 1172 1024",width:n+"px",height:n+"px",style:c,...l,children:(0,s.jsx)("path",{d:"M870.0416 250.4704a38.4 38.4 0 0 0-8.96 53.5552c13.056 18.2784 24.4224 37.8368 33.7408 58.112a38.4512 38.4512 0 0 0 50.944 18.8928 38.4512 38.4512 0 0 0 18.8416-50.944 436.0192 436.0192 0 0 0-40.96-70.6048 38.3488 38.3488 0 0 0-53.6064-9.0112zM181.4528 566.016a35.9936 35.9936 0 0 0 25.5488-10.5984L351.7952 410.624a36.096 36.096 0 1 0-51.0976-51.0976L217.6 442.5728C250.0096 278.1184 395.264 153.6 569.1392 153.6c50.7904 0 99.8912 10.3936 145.92 30.9248a38.4 38.4 0 1 0 31.232-70.0928 431.36 431.36 0 0 0-177.152-37.632c-214.6816 0-393.1136 156.416-428.4416 361.216L62.1568 359.4752a36.1984 36.1984 0 0 0-51.0976 51.0976l144.8448 144.7936a36.0448 36.0448 0 0 0 25.5488 10.6496zM978.5344 463.104a36.1984 36.1984 0 0 0-51.0976 0l-144.8448 144.7936a36.096 36.096 0 1 0 51.0976 51.0976l88.6272-88.576C894.3104 740.2496 746.8032 870.4 569.1392 870.4a357.7856 357.7856 0 0 1-325.2736-207.7184 38.4 38.4 0 1 0-69.7344 32.3072 434.3808 434.3808 0 0 0 394.9568 252.2112c215.1936 0 393.984-157.184 428.6464-362.7008l74.496 74.496a35.9936 35.9936 0 0 0 51.0976 0 36.096 36.096 0 0 0 0-51.0976l-144.7936-144.7936z",fill:r(t,0,"#333333")})})};y.defaultProps={size:18};const b=y,f={display:"block"},H=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...f,...i}:f;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:[(0,s.jsx)("path",{d:"M302 332a30 30 0 1 1 0-60h420a30 30 0 0 1 0 60H302zM302 542a30 30 0 0 1 0-60h420a30 30 0 0 1 0 60H302zM302 752a30 30 0 0 1 0-60h120a30 30 0 0 1 0 60H302z",fill:r(t,0,"#333333")}),(0,s.jsx)("path",{d:"M789.47 784.1a30 30 0 0 1 39.36 45.3l-144.24 125.25a30 30 0 0 1-19.68 7.35H214.85C163.4 962 122 919.46 122 867.38V156.62C122 104.54 163.4 62 214.85 62h594.3C860.6 62 902 104.54 902 156.62v529.05a30 30 0 1 1-60 0V156.62C842 137.3 827.09 122 809.15 122H214.85C196.91 122 182 137.3 182 156.62v710.76C182 886.7 196.91 902 214.85 902h438.84l135.78-117.9z",fill:r(t,1,"#333333")}),(0,s.jsx)("path",{d:"M692 931.19a30 30 0 1 1-60 0v-174.6C632 704.57 673.4 662 724.85 662h147.78a30 30 0 0 1 0 60h-147.78c-17.94 0-32.85 15.3-32.85 34.62v174.6z",fill:r(t,2,"#333333")})]})};H.defaultProps={size:18};const v=H,w={display:"block"},C=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...w,...i}:w;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:[(0,s.jsx)("path",{d:"M512 883.2A371.2 371.2 0 1 0 140.8 512 371.2 371.2 0 0 0 512 883.2z m0 64a435.2 435.2 0 1 1 435.2-435.2 435.2 435.2 0 0 1-435.2 435.2z",fill:r(t,0,"#333333")}),(0,s.jsx)("path",{d:"M557.056 512l122.368 122.368a31.744 31.744 0 1 1-45.056 45.056L512 557.056l-122.368 122.368a31.744 31.744 0 1 1-45.056-45.056L466.944 512 344.576 389.632a31.744 31.744 0 1 1 45.056-45.056L512 466.944l122.368-122.368a31.744 31.744 0 1 1 45.056 45.056z",fill:r(t,1,"#333333")})]})};C.defaultProps={size:18};const A=C,S={display:"block"},N=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...S,...i}:S;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:[(0,s.jsx)("path",{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 34.8-28.2 63-63 63H232c-34.8 0-63-28.2-63-63 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5 0.2 13 0.7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7 6 17.2 13.6 33.6 22.7 49 24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2c41.5-24.3 76.2-59 100.5-100.5 9.1-15.5 16.7-31.9 22.7-49C812.1 793.1 836 831.8 836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7 0.4-6.4 0.7-12.8 0.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3-20.1 11.8-42 20-64.9 24.3V484c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v396.5c-22.9-4.3-44.8-12.5-64.9-24.3-30.3-17.7-55.6-43-73.3-73.3C317.7 752 308 716.8 308 680V412h408v268z",fill:r(t,0,"#333333")}),(0,s.jsx)("path",{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1-17.2-31.5-42.5-56.8-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9-31.5 17.2-56.8 42.5-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z",fill:r(t,1,"#333333")})]})};N.defaultProps={size:18};const T=N,P={display:"block"},q=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...P,...i}:P;return(0,s.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:[(0,s.jsx)("path",{d:"M512 71.68c-242.688 0-440.32 197.632-440.32 440.32s197.632 440.32 440.32 440.32 440.32-197.632 440.32-440.32-197.632-440.32-440.32-440.32z m0 819.2c-208.896 0-378.88-169.984-378.88-378.88s169.984-378.88 378.88-378.88 378.88 169.984 378.88 378.88-169.984 378.88-378.88 378.88z",fill:r(t,0,"#333333")}),(0,s.jsx)("path",{d:"M542.72 261.12H481.28v220.16H261.12v61.44h220.16v220.16h61.44v-220.16h220.16V481.28h-220.16z",fill:r(t,1,"#333333")})]})};q.defaultProps={size:18};const I=q,X={display:"block"},R=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...X,...i}:X;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:(0,s.jsx)("path",{d:"M384 896h-64v-70.4c0-15.2-10.4-28-24.8-31.2C159.2 768 64 644.8 64 496v-32h64v32c0 118.4 73.6 215.2 179.2 236 44.8 8.8 76.8 48 76.8 94.4v69.6zM704 896h-64v-70.4c0-45.6 32-85.6 76.8-94.4C822.4 711.2 896 614.4 896 496v-32h64v32c0 148.8-95.2 272-231.2 298.4-14.4 3.2-24.8 16-24.8 31.2v70.4zM512.8 640l-41.6-37.6c-147.2-133.6-244-208-244-316.8 0-88 68.8-156.8 156.8-156.8 49.6 0 97.6 23.2 128.8 60C544 152 592 128.8 641.6 128.8c88 0 156.8 68.8 156.8 156.8 0 108-96.8 183.2-244 316.8L512.8 640z",fill:r(t,0,"#333333")})})};R.defaultProps={size:18};const L=R,k={display:"block"},F=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...k,...i}:k;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:(0,s.jsx)("path",{d:"M942.4615936 284.62787926c-14.30911886-14.12709945-37.31996786-14.05468217-51.48229632 0.21920654L517.97142983 661.27810333 139.75544149 286.45003606c-14.30911886-14.16232846-37.31996786-14.05468217-51.51948344 0.21920654-14.16232846 14.30911886-14.05468217 37.35519687 0.21920654 51.51948345l401.99014627 398.34974663c0.61847666 0.61847666 1.41897273 0.76526706 2.03940637 1.34655658 0.14483342 0.14483342 0.18201941 0.32685283 0.32685283 0.47364324 7.09877874 7.02636259 16.38375538 10.55911595 25.63154489 10.55911595 9.35739278 0 18.75001458-3.60516949 25.85075143-10.77636551l398.34974663-401.99014628C956.84312974 321.8382427 956.73548345 298.7921647 942.4615936 284.62787926z",fill:r(t,0,"#333333")})})};F.defaultProps={size:18};const M=F,D={display:"block"},G=e=>{let{size:n,color:t,style:i,...l}=e;const c=i?{...D,...i}:D;return(0,s.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:c,...l,children:(0,s.jsx)("path",{d:"M81.5384064 739.37212074c14.30911886 14.12709945 37.31996786 14.05468217 51.48229632-0.21920654L506.02857017 362.72189667 884.24455851 737.54996394c14.30911886 14.16232846 37.31996786 14.05468217 51.51948344-0.21920654 14.16232846-14.30911886 14.05468217-37.35519687-0.21920654-51.51948345l-401.99014627-398.34974663c-0.61847666-0.61847666-1.41897273-0.76526706-2.03940637-1.34655658-0.14483342-0.14483342-0.18201941-0.32685283-0.32685282-0.47364324-7.09877874-7.02636259-16.38375538-10.55911595-25.6315449-10.55911595-9.35739278 0-18.75001458 3.60516949-25.85075143 10.77636551l-398.34974663 401.99014628C67.15687026 702.1617573 67.26451655 725.2078353 81.5384064 739.37212074z",fill:r(t,0,"#333333")})})};G.defaultProps={size:18};const E=G,B=e=>{let{name:n,...t}=e;switch(n){case"youhua":return(0,s.jsx)(c,{...t});case"dayi":return(0,s.jsx)(o,{...t});case"shengji":return(0,s.jsx)(u,{...t});case"tiaozheng":return(0,s.jsx)(g,{...t});case"gengxin":return(0,s.jsx)(b,{...t});case"wendang":return(0,s.jsx)(v,{...t});case"shanchu":return(0,s.jsx)(A,{...t});case"bug":return(0,s.jsx)(T,{...t});case"xinzeng":return(0,s.jsx)(I,{...t});case"fuwu":return(0,s.jsx)(L,{...t});case"down":return(0,s.jsx)(M,{...t});case"up":return(0,s.jsx)(E,{...t})}return null},z={label:"label_p8vM",icon:"icon_knQK"};function U(e){const{children:n}=e,t={"\u65b0\u589e":{icon:"xinzeng",bgColor:"#39b54a"},"\u4fee\u590d":{icon:"bug",bgColor:"#9c26b0"},"\u6587\u6863":{icon:"wendang",bgColor:"rgb(79, 147, 255)"},"\u66f4\u65b0":{icon:"gengxin",bgColor:"#0081ff"},"\u8c03\u6574":{icon:"tiaozheng",bgColor:"#333"},"\u5347\u7ea7":{icon:"shengji",bgColor:"#e03997"},"\u79fb\u9664":{icon:"shanchu",bgColor:"#666"},"\u7b54\u7591":{icon:"dayi",bgColor:"#bbb"},"\u4f18\u5316":{icon:"youhua",bgColor:"#38e550"}};return(0,s.jsxs)("label",{className:z.label,title:n,style:{backgroundColor:t[n].bgColor},children:[(0,s.jsx)(B,{name:t[n].icon,color:"white",size:14,className:z.icon})," ",n]})}},1151:(e,n,t)=>{t.d(n,{Z:()=>c,a:()=>l});var r=t(7294);const s={},i=r.createContext(s);function l(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);