add legacy support of checkbox, add documents for cookie/lgres/request

This commit is contained in:
2023-03-31 00:11:55 +08:00
parent 5406eea20e
commit 45ae222d25
13 changed files with 222 additions and 18 deletions

37
lib/utility/request.html Normal file
View File

@ -0,0 +1,37 @@
<div>
<h1>request</h1>
<hr />
<p>
网络请求工具类,可以实现比较常见的一些请求操作。
</p>
<h2>get</h2>
<code>function get(url: string, options?: RequestOptions): Promise&lt;Response&gt;</code>
<h3>url: string</h3>
<p>
url 地址
</p>
<h3>options?: RequestOptions</h3>
<p>
请求的配置参数,结构为
<pre>interface RequestOptions {
method?: string;
accept?: string;
contentType?: string;
customerHeaders?: { [key: string]: string };
signal?: AbortSignal | null;
progress?: (this: XMLHttpRequestUpload, ev: ProgressEvent&lt;XMLHttpRequestEventTarget&gt;) => any
}</pre>
</p>
<h3>method?: string</h3>
<p>
请求类型,默认为 GET 或 POST
</p>
<h3>accept?: string</h3>
<p>
Accept 请求头的值
</p>
<h3>contentType?: string</h3>
<p>
Content-Type 请求头的值
</p>
</div>