From 9948f8dc4ec678ff194c4ebb78db06bf3542771e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=95=E7=BB=B4=E5=89=8D?= Date: Thu, 24 Jul 2025 19:45:25 +0800 Subject: [PATCH] Refactoring of any&object in network services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: https://gitee.com/openharmony/interface_sdk-js/issues/ICOK2N Signed-off-by: 单维前 --- frameworks/ets/ani/http/ets/@ohos.net.http.ets | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frameworks/ets/ani/http/ets/@ohos.net.http.ets b/frameworks/ets/ani/http/ets/@ohos.net.http.ets index 54d6a49f8..60a459c49 100644 --- a/frameworks/ets/ani/http/ets/@ohos.net.http.ets +++ b/frameworks/ets/ani/http/ets/@ohos.net.http.ets @@ -16,7 +16,7 @@ import type { AsyncCallback, Callback } from '@ohos.base'; import type connection from '@ohos.net.connection'; -import { BusinessError } from '@ohos.base'; +import { BusinessError, RecordData } from '@ohos.base'; export default namespace http { loadLibrary("http_ani") @@ -49,7 +49,7 @@ export default namespace http { export interface HttpRequestOptions { method?: RequestMethod; - extraData?: string | Object | ArrayBuffer; + extraData?: string | RecordData | ArrayBuffer; expectDataType?: HttpDataType; @@ -57,7 +57,7 @@ export default namespace http { priority?: int; - header?: Object; + header?: Record; readTimeout?: int; @@ -149,7 +149,7 @@ export default namespace http { remoteFileName?: string; - data?: string | Object | ArrayBuffer; + data?: string | RecordData | ArrayBuffer; filePath?: string; } @@ -447,13 +447,13 @@ export default namespace http { } export interface HttpResponse { - result: string | Object | ArrayBuffer; + result: string | RecordData | ArrayBuffer; resultType: HttpDataType; responseCode: ResponseCode | int; - header: Object; + header: Record; cookies: string; @@ -461,13 +461,13 @@ export default namespace http { } class HttpResponseInner implements HttpResponse { - result: string | Object | ArrayBuffer; + result: string | RecordData | ArrayBuffer; resultType: HttpDataType; responseCode: ResponseCode | int; - header: Object; + header: Record; cookies: string; -- Gitee