diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 01dec2154bf527395dfa44b26d9b9c410f46686d..0d3bc0180c16a2c7a9f43c4d3b240dc987ed5417 100755 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -248,6 +248,66 @@ declare class WebResourceRequest { isRedirect(): boolean; } + +/** + * Defines the web resource response. + * @since 8 + */ + declare class WebResourceResponse { + /** + * Constructor. + * @since 8 + */ + constructor(); + + /** + * Get the data. + * + * @return Return the data. + * @since 8 + */ + getData(): string; + + /** + * Get the encoding. + * + * @return Return the encoding. + * @since 8 + */ + getEncoding(): string; + + /** + * Get the mime type. + * + * @return Return the mime type. + * @since 8 + */ + getMimeType(): string; + + /** + * Get the reason phrase. + * + * @return Return the reason phrase. + * @since 8 + */ + getReasonPhrase(): string; + + /** + * Get the headers. + * @return Return the headers. + * @since 8 + */ + getResponseHeaders() : Map; + + /** + * Get the status code. + * + * @return Return the status code. + * @since 8 + */ + getStatusCode(): number; +} + /** * Defines the web resource error. * @since 8 @@ -693,7 +753,7 @@ declare class WebAttribute extends CommonMethod { * @since 8 */ onHttpErrorReceive( - callback: (event?: { request: WebResourceRequest; error: WebResourceError }) => void, + callback: (event?: { request: WebResourceRequest; response: WebResourceResponse }) => void, ): WebAttribute; /**