add legacy support of checkbox, add documents for cookie/lgres/request
This commit is contained in:
37
lib/utility/request.html
Normal file
37
lib/utility/request.html
Normal file
@ -0,0 +1,37 @@
|
||||
<div>
|
||||
<h1>request</h1>
|
||||
<hr />
|
||||
<p>
|
||||
网络请求工具类,可以实现比较常见的一些请求操作。
|
||||
</p>
|
||||
<h2>get</h2>
|
||||
<code>function get(url: string, options?: RequestOptions): Promise<Response></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<XMLHttpRequestEventTarget>) => 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>
|
Reference in New Issue
Block a user