install: update script

This commit is contained in:
undefined committed 2021-10-31 22:32:24 +08:00
1 parent 5eceaeb4d7
commit 5c5864a7c2
2 files changed
+193 -56

No files matched your search

+64 -1
View File
@@ -522,6 +522,69 @@ interface HttpModule {
* @return 存储的文件名
*/
download(url: string, filename?: string): string;
/**
* 发送HTTP GET请求
* @param url 请求URL
* @param headers 请求头
* @return 响应结果
*/
get(url: String, headers?: Record<string, string>): HttpResponse;
/**
* 发送HTTP HEAD请求
* @param url 请求URL
* @param headers 请求头
* @return 响应结果
*/
head(url: String, headers?: Record<string, string>): HttpResponse;
/**
* 发送HTTP OPTIONS请求
* @param url 请求URL
* @param headers 请求头
* @return 响应结果
*/
options(url: String, headers?: Record<string, string>): HttpResponse;
/**
* 发送HTTP POST请求
* @param url 请求URL
* @param headers 请求头
* @param body 请求体
* @return 响应结果
*/
post(
url: String,
headers?: Record<string, string>,
body?: string
): HttpResponse;
/**
* 发送HTTP PUT请求
* @param url 请求URL
* @param headers 请求头
* @param body 请求体
* @return 响应结果
*/
put(
url: String,
headers?: Record<string, string>,
body?: string
): HttpResponse;
/**
* 发送HTTP DELETE请求
* @param url 请求URL
* @param headers 请求头
* @param body 请求体
* @return 响应结果
*/
delete(
url: String,
headers?: Record<string, string>,
body?: string
): HttpResponse;
}
interface HttpResponse {
@@ -712,4 +775,4 @@ interface SqlExecResult {
* @param ok 要断言的值
* @param message 提示信息
*/
declare function assert(ok: boolean, message?: string);
declare function assert(ok: boolean, message?: string);