From 7b398545a2cb7829fd5bee1381a338c6cd84080d Mon Sep 17 00:00:00 2001 From: liujinwei Date: Wed, 9 Mar 2022 10:01:36 +0800 Subject: [PATCH] fixed e59f932 from https://gitee.com/jinweiliu/interface_sdk-js/pulls/999 add interface Signed-off-by: liujinwei Change-Id: I7b406aea59083ce3f2689dc520fb296e9ef495ba --- api/@internal/component/ets/web.d.ts | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index eba8d735d8..254c1188c3 100755 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -225,10 +225,10 @@ declare class WebResourceRequest { /** * Get request headers. * - * @return Return a map of the request headers + * @return Return the request headers * @since 8 */ - getRequestHeader(): Map; + getRequestHeader(): Array
; /** * Get the request url. @@ -312,7 +312,7 @@ declare class WebResourceRequest { * @return Return the response headers. * @since 8 */ - getResponseHeader() : Map; + getResponseHeader() : Array
; /** * Get the response code. @@ -323,6 +323,26 @@ declare class WebResourceRequest { getResponseCode(): number; } +/** + * Defines the web resource header. + * @since 8 + */ + declare interface Header { + /** + * Get the key of the web header. + * + * @since 8 + */ + headerKey: string; + + /** + * Get the value of the web header. + * + * @since 8 + */ + headerValue: string; +} + /** * Defines the web resource error. * @since 8 -- Gitee