@ywfe/fe-tools 1.2.1-beta.37 → 1.2.1-beta.39
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/lib/ywfe-tools.cjs +2 -1
- package/lib/ywfe-tools.cjs.map +1 -1
- package/lib/ywfe-tools.esm.js +2 -1
- package/lib/ywfe-tools.esm.js.map +1 -1
- package/lib/ywfe-tools.umd.js +1 -1
- package/lib/ywfe-tools.umd.js.map +1 -1
- package/package.json +1 -1
- package/request.ts +2 -1
- package/tsconfig.json +4 -2
package/package.json
CHANGED
package/request.ts
CHANGED
|
@@ -23,7 +23,6 @@ async function request({ input }: { input: RequestOptions }) {
|
|
|
23
23
|
};
|
|
24
24
|
const prefix = getBasePath();
|
|
25
25
|
let requestUrl = isValidURL(input.url) ? input.url : `${prefix}${input.url}`;
|
|
26
|
-
console.log('requestUrl',requestUrl,isValidURL(input.url))
|
|
27
26
|
const fetchOption: { [key: string]: any } = {
|
|
28
27
|
method: method,
|
|
29
28
|
headers: {
|
|
@@ -39,9 +38,11 @@ async function request({ input }: { input: RequestOptions }) {
|
|
|
39
38
|
const response = await fetch(requestUrl, fetchOption);
|
|
40
39
|
if (!response.ok) {
|
|
41
40
|
const message = `An error has occured: ${response.status}`;
|
|
41
|
+
console.log('req result', message);
|
|
42
42
|
return { success: false, message };
|
|
43
43
|
}
|
|
44
44
|
const result = await response.json();
|
|
45
|
+
console.log('req result',result);
|
|
45
46
|
return result;
|
|
46
47
|
}
|
|
47
48
|
|