xframelib 0.8.5 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.cjs +6 -6
- package/dist/index.js +6 -6
- package/dist/utils/AxiosHelper.d.ts +15 -5
- package/dist/utils/FileDownload.d.ts +1 -0
- package/dist/utils/StringUtils.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResponseType } from
|
|
1
|
+
import { ResponseType } from "axios";
|
|
2
2
|
/**
|
|
3
3
|
* Get服务请求
|
|
4
4
|
* @param apiUrl API接口路径
|
|
@@ -35,12 +35,13 @@ declare function requestPost(apiUrl: string, baseUrl?: string, _bodyFormParams?:
|
|
|
35
35
|
*/
|
|
36
36
|
declare function requestPostBody(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType, timeoutMS?: number): Promise<any>;
|
|
37
37
|
/**
|
|
38
|
-
* 业务服务Get
|
|
39
|
-
* @param
|
|
38
|
+
* 业务服务Get请求、请求网站下资源、http完整请求
|
|
39
|
+
* @param url public下资源相对路径
|
|
40
40
|
* @param _params 参数
|
|
41
|
+
* @param isForceAPI 是否强制为API请求,默认false
|
|
41
42
|
* @returns 返回Promise对象
|
|
42
43
|
*/
|
|
43
|
-
declare function get(
|
|
44
|
+
declare function get(url: string, _params?: any, isForceAPI?: boolean): Promise<any>;
|
|
44
45
|
/**
|
|
45
46
|
* 业务服务Post请求
|
|
46
47
|
* @param apiUrl API接口路径
|
|
@@ -53,7 +54,16 @@ declare function post(apiUrl: string, _params?: any): Promise<any>;
|
|
|
53
54
|
* @param fullRequestURL 完整请求路径
|
|
54
55
|
* @param _params 请求参数
|
|
55
56
|
* @returns 返回Promise对象
|
|
57
|
+
* @deprecated 使用get方法替代,日后删除
|
|
56
58
|
*/
|
|
57
59
|
declare function getData(fullRequestURL: string, _params?: any): Promise<any>;
|
|
58
|
-
|
|
60
|
+
/**
|
|
61
|
+
* 下载网站或完整路径的文件(二进制、文本)
|
|
62
|
+
* @param url 网站相对路径或完整路径
|
|
63
|
+
* @param fileName 文件名(默认为空,从URL里截取)
|
|
64
|
+
* @param _params get请求参数
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
declare function getDownload(url: string, fileName?: string, _params?: any): void;
|
|
68
|
+
export { get, post, requestPost, requestGet, getData, requestPostBody, getDownload };
|
|
59
69
|
export type { ResponseType };
|