optimized

This commit is contained in:
2023-04-06 00:08:03 +08:00
parent adb74b7441
commit c27d44872b
11 changed files with 314 additions and 91 deletions

View File

@ -22,19 +22,19 @@
progress?: (this: XMLHttpRequestUpload, ev: ProgressEvent<XMLHttpRequestEventTarget>) => any
}</pre>
</p>
<h3>method?: string</h3>
<h4>method?: string</h4>
<p>
请求类型,默认为 GET 或 POST
</p>
<h3>accept?: string</h3>
<h4>accept?: string</h4>
<p>
Accept 请求头的值
</p>
<h3>contentType?: string</h3>
<h4>contentType?: string</h4>
<p>
Content-Type 请求头的值
</p>
<h3>customerHeaders?: { [key: string]: string }</h3>
<h4>customerHeaders?: { [key: string]: string }</h4>
<p>
自定义请求头,例如
<pre>{
@ -42,11 +42,11 @@
'X-Auth-Token': 'xxxxxx'
}</pre>
</p>
<h3>signal?: AbortSignal | null</h3>
<h4>signal?: AbortSignal | null</h4>
<p>
终止器的信号,用来控制终止请求任务
</p>
<h3>progress?: (this: XMLHttpRequestUpload, ev: ProgressEvent&lt;XMLHttpRequestEventTarget&gt;) => any</h3>
<h4>progress?: (this: XMLHttpRequestUpload, ev: ProgressEvent&lt;XMLHttpRequestEventTarget&gt;) => any</h4>
<p>
调用 upload 方法时在上传过程中触发的事件,返回进度参数
</p>