@tarojs/plugin-platform-harmony-ets 4.0.0-beta.8 → 4.0.0-beta.9
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.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// ✅ RequestTask.onHeadersReceived
|
|
7
7
|
|
|
8
8
|
import http from '@ohos.net.http'
|
|
9
|
-
import { isString
|
|
9
|
+
import { isString } from '@tarojs/shared'
|
|
10
10
|
|
|
11
11
|
import { callAsyncFail, callAsyncSuccess, validateParams } from '../utils'
|
|
12
12
|
|
|
@@ -59,10 +59,10 @@ export const request: typeof Taro.request = function (options) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// 检查 Header 是否有 Referer
|
|
62
|
-
if (isUndefined(header.Referer)) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
62
|
+
// if (isUndefined(header.Referer)) {
|
|
63
|
+
// const error = { errMsg: 'request fail parameter error: the header doesn‘t support Referer property' }
|
|
64
|
+
// callAsyncFail(reject, error, options)
|
|
65
|
+
// }
|
|
66
66
|
|
|
67
67
|
// 检查 method 是否正确
|
|
68
68
|
if (method) {
|
|
@@ -13,5 +13,5 @@ export * from './dom/stylesheet'
|
|
|
13
13
|
export * from './interface'
|
|
14
14
|
export * from './utils'
|
|
15
15
|
export * from './utils/info'
|
|
16
|
-
export { URLSearchParams, eventSource } from '@tarojs/runtime/dist/runtime.esm'
|
|
16
|
+
export { URLSearchParams, eventSource, Events } from '@tarojs/runtime/dist/runtime.esm'
|
|
17
17
|
export { hooks } from '@tarojs/shared'
|
package/dist/runtime-utils.js
CHANGED
|
@@ -2611,10 +2611,10 @@ const request = function (options) {
|
|
|
2611
2611
|
header['Content-Type'] = 'application/json';
|
|
2612
2612
|
}
|
|
2613
2613
|
// 检查 Header 是否有 Referer
|
|
2614
|
-
if (isUndefined(header.Referer)) {
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
}
|
|
2614
|
+
// if (isUndefined(header.Referer)) {
|
|
2615
|
+
// const error = { errMsg: 'request fail parameter error: the header doesn‘t support Referer property' }
|
|
2616
|
+
// callAsyncFail(reject, error, options)
|
|
2617
|
+
// }
|
|
2618
2618
|
// 检查 method 是否正确
|
|
2619
2619
|
if (method) {
|
|
2620
2620
|
if (!METHOD.includes(method)) {
|