From 3b365325930f93515deb00116486f4f5db3a614b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Tue, 9 Jul 2024 11:53:17 +0800 Subject: [PATCH] chore: build harmony --- packages/uni-app-harmony/dist/uni.api.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/uni-app-harmony/dist/uni.api.ets b/packages/uni-app-harmony/dist/uni.api.ets index 55f6319aed..ee89625cbe 100644 --- a/packages/uni-app-harmony/dist/uni.api.ets +++ b/packages/uni-app-harmony/dist/uni.api.ets @@ -2793,7 +2793,7 @@ export function initUniExtApi(APP_ID: string) { } }; httpRequest.on('headersReceive', (header: Object)=>{}); - httpRequest.request(url, { + httpRequest.request(encodeURI(url), { header: headers, method: (method || 'GET').toUpperCase() as http.RequestMethod, extraData: data, @@ -3419,7 +3419,7 @@ export function initUniExtApi(APP_ID: string) { totalBytesExpectedToSend: totalSize } as OnProgressUpdateResult); }); - httpRequest.request(url, { + httpRequest.request(encodeURI(url), { header: headers, method: http1.RequestMethod.POST, connectTimeout: timeout ? timeout : undefined, @@ -3533,7 +3533,7 @@ export function initUniExtApi(APP_ID: string) { stream = fs3.createStreamSync(tempFilePath, 'w+'); queueWrite(data); }); - httpRequest.requestInStream(url, { + httpRequest.requestInStream(encodeURI(url), { header: header ? header : {} as ESObject, method: http2.RequestMethod.GET, connectTimeout: timeout ? timeout : undefined, @@ -4393,7 +4393,7 @@ export function initUniExtApi(APP_ID: string) { const socketTasks: SocketTask1[] = []; const connectSocket = defineTaskApi(API_CONNECT_SOCKET, (args: ConnectSocketOptions, exec: ApiExecutor)=>{ const ws = webSocket.createWebSocket(); - ws.connect(args.url, { + ws.connect(encodeURI(args.url), { header: args.header ? args.header as Object : undefined } as webSocket.WebSocketRequestOptions); const task = new SocketTask1(ws); -- GitLab