1e41f4b71Sopenharmony_ci# Web 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## Overview 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciThis module provides error codes for the exceptions of ArkWeb NDK APIs, 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ciAPIs for injecting objects and executing JavaScript code, 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ciAPIs for intercepting ArkWeb requests, 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ciand error codes for the ArkWeb network protocol stack. 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ciIn addition, ArkWeb capabilities on the native side are also provided, such as refreshing web page, executing JavaScript, and registering callback. 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci**Since**: 12 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci## Summary 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ci### Files 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci| Name| Description| 25e41f4b71Sopenharmony_ci| -------- | -------- | 26e41f4b71Sopenharmony_ci| [arkweb_error_code.h](arkweb__error__code_8h.md) | Declares the error codes of the ArkWeb NDK APIs.<br> **Library**: libohweb.so| 27e41f4b71Sopenharmony_ci| [arkweb_interface.h](arkweb__interface_8h.md) | Provides ArkWeb APIs for obtaining native APIs and the basic native API types.<br> **Library**: libohweb.so| 28e41f4b71Sopenharmony_ci| [arkweb_net_error_list.h](arkweb__net__error__list_8h.md) | Declares the error codes of the ArkWeb network protocol stack.<br> **Library**: libohweb.so| 29e41f4b71Sopenharmony_ci| [arkweb_scheme_handler.h](arkweb__scheme__handler_8h.md) | Declares the APIs used to intercept requests from ArkWeb.<br> **Library**: libohweb.so| 30e41f4b71Sopenharmony_ci| [arkweb_type.h](arkweb__type_8h.md) | Defines the common types of ArkWeb on the native side.<br> **Library**: libohweb.so| 31e41f4b71Sopenharmony_ci| [native_interface_arkweb.h](native__interface__arkweb_8h.md) | Declares APIs used to inject objects and execute JavaScript code.<br> **Library**: libohweb.so| 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci### Structs 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci| Name| Description| 37e41f4b71Sopenharmony_ci| -------- | -------- | 38e41f4b71Sopenharmony_ci| struct [ArkWeb_AnyNativeAPI](_ark_web___any_native_a_p_i.md) | Defines the basic native API types. | 39e41f4b71Sopenharmony_ci| struct [ArkWeb_JavaScriptBridgeData](_ark_web___java_script_bridge_data.md) | Defines the basic structure of JavaScript Bridge data. | 40e41f4b71Sopenharmony_ci| struct [ArkWeb_JavaScriptObject](_ark_web___java_script_object.md) | Defines an injected JavaScript object. | 41e41f4b71Sopenharmony_ci| struct [ArkWeb_ProxyMethod](_ark_web___proxy_method.md) | Defines an injected proxy method. | 42e41f4b71Sopenharmony_ci| struct [ArkWeb_ProxyObject](_ark_web___proxy_object.md) | Defines an injected proxy object. | 43e41f4b71Sopenharmony_ci| struct [ArkWeb_ControllerAPI](_ark_web___controller_a_p_i.md) | Defines a native API struct of the **Web** controller. Before calling the API, you are advised to use **ARKWEB_MEMBER_MISSING** to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. | 44e41f4b71Sopenharmony_ci| struct [ArkWeb_ComponentAPI](_ark_web___component_a_p_i.md) | Defines a native API struct of the **Web** component. | 45e41f4b71Sopenharmony_ci| struct [ArkWeb_WebMessagePortAPI](_ark_web___web_message_port_a_p_i.md) | Defines a native API struct of the post message. Before calling the API, you are advised to use **ARKWEB_MEMBER_MISSING** to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. | 46e41f4b71Sopenharmony_ci| struct [ArkWeb_WebMessageAPI](_ark_web___web_message_a_p_i.md) | Defines a native API struct of the post message data. Before calling the API, you are advised to use **ARKWEB_MEMBER_MISSING** to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. | 47e41f4b71Sopenharmony_ci| struct [ArkWeb_CookieManagerAPI](_ark_web___cookie_manager_a_p_i.md) | Defines a native **CookieManager** API of ArkWeb. Before calling an API, you are advised to use **ARKWEB_MEMBER_MISSING** to check whether the function struct has the corresponding pointer to avoid crash caused by mismatch between the SDK and the device ROM. | 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_ci 50e41f4b71Sopenharmony_ci### Macros 51e41f4b71Sopenharmony_ci 52e41f4b71Sopenharmony_ci| Name| Description| 53e41f4b71Sopenharmony_ci| -------- | -------- | 54e41f4b71Sopenharmony_ci| [ARKWEB_MEMBER_EXISTS](#arkweb_member_exists)(s, f) ((intptr_t) & ((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= \*reinterpret_cast<size_t\*>(s)) | Checks whether the member variable exists in the struct. | 55e41f4b71Sopenharmony_ci| [ARKWEB_MEMBER_MISSING](#arkweb_member_missing)(s, f) (\(s, f) \|\| !((s)->f)) | If the member variable exists in the struct, **false** is returned. Otherwise, **true** is returned. | 56e41f4b71Sopenharmony_ci 57e41f4b71Sopenharmony_ci 58e41f4b71Sopenharmony_ci### Types 59e41f4b71Sopenharmony_ci 60e41f4b71Sopenharmony_ci| Name| Description| 61e41f4b71Sopenharmony_ci| -------- | -------- | 62e41f4b71Sopenharmony_ci| typedef enum [ArkWeb_ErrorCode](#arkweb_errorcode) [ArkWeb_ErrorCode](#arkweb_errorcode) | Defines an enum for the error codes of ArkWeb NDK APIs. | 63e41f4b71Sopenharmony_ci| typedef enum [ArkWeb_NetError](#arkweb_neterror) [ArkWeb_NetError](#arkweb_neterror) | Defines an enum for the error codes of the ArkWeb network protocol stack. | 64e41f4b71Sopenharmony_ci| typedef enum [ArkWeb_CustomSchemeOption](#arkweb_customschemeoption) [ArkWeb_CustomSchemeOption](#arkweb_customschemeoption) | Defines an enum for the custom scheme options. | 65e41f4b71Sopenharmony_ci| typedef enum [ArkWeb_ResourceType](#arkweb_resourcetype) [ArkWeb_ResourceType](#arkweb_resourcetype) | Defines an enum for the resource types. | 66e41f4b71Sopenharmony_ci| typedef struct ArkWeb_SchemeHandler_ [ArkWeb_SchemeHandler](#arkweb_schemehandler) | Defines a struct for the **SchemeHandler** of a specified scheme. | 67e41f4b71Sopenharmony_ci| typedef struct ArkWeb_ResourceHandler_ [ArkWeb_ResourceHandler](#arkweb_resourcehandler) | Defines a struct for the intercepted URL requests. | 68e41f4b71Sopenharmony_ci| typedef struct ArkWeb_Response_ [ArkWeb_Response](#arkweb_response) | Defines a struct for **ArkWeb_Response** for the intercepted request. | 69e41f4b71Sopenharmony_ci| typedef struct ArkWeb_ResourceRequest_ [ArkWeb_ResourceRequest](#arkweb_resourcerequest) | Defines a struct for resource request. Through **OH_ArkWeb_ResourceRequest**, you can obtain the URL, method, post data, and other information of the request. | 70e41f4b71Sopenharmony_ci| typedef struct ArkWeb_RequestHeaderList_ [ArkWeb_RequestHeaderList](#arkweb_requestheaderlist) | Defines a struct for the request header list. | 71e41f4b71Sopenharmony_ci| typedef struct ArkWeb_HttpBodyStream_ [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) | Defines a struct for the uploaded data of the request. | 72e41f4b71Sopenharmony_ci| typedef void(\* [ArkWeb_OnRequestStart](#arkweb_onrequeststart)) (const [ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler, [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest, const [ArkWeb_ResourceHandler](#arkweb_resourcehandler) \*resourceHandler, bool \*intercept) | Defines a callback used to start the request on the I/O thread. | 73e41f4b71Sopenharmony_ci| typedef void(\* [ArkWeb_OnRequestStop](#arkweb_onrequeststop)) (const [ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler, const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest) | Defines a callback used when the request is stopped. | 74e41f4b71Sopenharmony_ci| typedef void(\* [ArkWeb_HttpBodyStreamReadCallback](#arkweb_httpbodystreamreadcallback)) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream, uint8_t \*buffer, int bytesRead) | Defines a callback used when **OH_ArkWebHttpBodyStream_Read** is complete. | 75e41f4b71Sopenharmony_ci| typedef void(\* [ArkWeb_HttpBodyStreamInitCallback](#arkweb_httpbodystreaminitcallback)) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream, [ArkWeb_NetError](#arkweb_neterror) result) | Defines a callback used when **ArkWeb_HttpBodyStream** is initialized. | 76e41f4b71Sopenharmony_ci| typedef enum [ArkWeb_WebMessageType](#arkweb_webmessagetype) [ArkWeb_WebMessageType](#arkweb_webmessagetype) | Defines an enum for the data types of post message. | 77e41f4b71Sopenharmony_ci| typedef struct ArkWeb_WebMessage \* [ArkWeb_WebMessagePtr](#arkweb_webmessageptr) | Defines a struct for the pointer to the data struct of post message. | 78e41f4b71Sopenharmony_ci| typedef void(\* [ArkWeb_OnJavaScriptCallback](#arkweb_onjavascriptcallback)) (const char \*webTag, const [ArkWeb_JavaScriptBridgeData](_ark_web___java_script_bridge_data.md) \*data, void \*userData) | Defines a callback used when the injected JavaScript is executed. | 79e41f4b71Sopenharmony_ci| typedef void(\* [ArkWeb_OnJavaScriptProxyCallback](#arkweb_onjavascriptproxycallback)) (const char \*webTag, const [ArkWeb_JavaScriptBridgeData](_ark_web___java_script_bridge_data.md) \*dataArray, size_t arraySize, void \*userData) | Defines a callback used when the proxy method is executed. | 80e41f4b71Sopenharmony_ci| typedef void(\* [ArkWeb_OnComponentCallback](#arkweb_oncomponentcallback)) (const char \*webTag, void \*userData) | Defines a callback used to return component event notification. | 81e41f4b71Sopenharmony_ci| typedef struct ArkWeb_WebMessagePort \* [ArkWeb_WebMessagePortPtr](#arkweb_webmessageportptr) | Defines a struct for the pointer to the message port struct. | 82e41f4b71Sopenharmony_ci| typedef void(\* [ArkWeb_OnMessageEventHandler](#arkweb_onmessageeventhandler)) (const char \*webTag, const [ArkWeb_WebMessagePortPtr](#arkweb_webmessageportptr) port, const [ArkWeb_WebMessagePtr](#arkweb_webmessageptr) message, void \*userData) | Defines a callback used to process the post message data sent by the HTML page. | 83e41f4b71Sopenharmony_ci| typedef void(\* [NativeArkWeb_OnJavaScriptCallback](#nativearkweb_onjavascriptcallback)) (const char \*) | Defines a callback used to return the result after the JavaScript code is executed. | 84e41f4b71Sopenharmony_ci| typedef char \*(\* [NativeArkWeb_OnJavaScriptProxyCallback](#nativearkweb_onjavascriptproxycallback)) (const char \*\*argv, int32_t argc) | Defines a callback of the injected object. | 85e41f4b71Sopenharmony_ci| typedef void(\* [NativeArkWeb_OnValidCallback](#nativearkweb_onvalidcallback)) (const char \*) | Defines a callback used when the **Web** component is valid. | 86e41f4b71Sopenharmony_ci| typedef void(\* [NativeArkWeb_OnDestroyCallback](#nativearkweb_ondestroycallback)) (const char \*) | Defines a callback used when the \<Web> component is destroyed. | 87e41f4b71Sopenharmony_ci 88e41f4b71Sopenharmony_ci 89e41f4b71Sopenharmony_ci### Enums 90e41f4b71Sopenharmony_ci 91e41f4b71Sopenharmony_ci| Name| Description| 92e41f4b71Sopenharmony_ci| -------- | -------- | 93e41f4b71Sopenharmony_ci| [ArkWeb_ErrorCode](#arkweb_errorcode) {<br>ARKWEB_SUCCESS = 0, ARKWEB_INIT_ERROR = 17100001, ARKWEB_ERROR_UNKNOWN = 17100100, ARKWEB_INVALID_PARAM = 17100101,<br>ARKWEB_SCHEME_REGISTER_FAILED = 17100102, ARKWEB_INVALID_URL = 17100103, ARKWEB_INVALID_COOKIE_VALUE = 17100104<br>} | Enumerates the error codes of ArkWeb NDK APIs. | 94e41f4b71Sopenharmony_ci| [ArkWeb_NativeAPIVariantKind](#arkweb_nativeapivariantkind) {<br>ARKWEB_NATIVE_COMPONENT, ARKWEB_NATIVE_CONTROLLER, ARKWEB_NATIVE_WEB_MESSAGE_PORT, ARKWEB_NATIVE_WEB_MESSAGE,<br>ARKWEB_NATIVE_COOKIE_MANAGER<br>} | Enumerates the native API types. | 95e41f4b71Sopenharmony_ci| [ArkWeb_NetError](#arkweb_neterror) {<br>ARKWEB_NET_OK = 0, ARKWEB_ERR_IO_PENDING = -1, ARKWEB_ERR_FAILED = -2, ARKWEB_ERR_ABORTED = -3,<br>ARKWEB_ERR_INVALID_ARGUMENT = -4, ARKWEB_ERR_INVALID_HANDLE = -5, ARKWEB_ERR_FILE_NOT_FOUND = -6, ARKWEB_ERR_TIMED_OUT = -7,<br>ARKWEB_ERR_FILE_TOO_LARGE = -8, ARKWEB_ERR_UNEXPECTED = -9, ARKWEB_ERR_ACCESS_DENIED = -10, ARKWEB_ERR_NOT_IMPLEMENTED = -11,<br>ARKWEB_ERR_INSUFFICIENT_RESOURCES = -12, ARKWEB_ERR_OUT_OF_MEMORY = -13, ARKWEB_ERR_UPLOAD_FILE_CHANGED = -14, ARKWEB_ERR_SOCKET_NOT_CONNECTED = -15,<br>ARKWEB_ERR_FILE_EXISTS = -16, ARKWEB_ERR_FILE_PATH_TOO_LONG = -17, ARKWEB_ERR_FILE_NO_SPACE = -18, ARKWEB_ERR_FILE_VIRUS_INFECTED = -19,<br>ARKWEB_ERR_BLOCKED_BY_CLIENT = -20, ARKWEB_ERR_NETWORK_CHANGED = -21, ARKWEB_ERR_BLOCKED_BY_ADMINISTRATOR = -22, ARKWEB_ERR_SOCKET_CONNECTED = -23,<br>ARKWEB_ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25, ARKWEB_ERR_CONTEXT_SHUT_DOWN = -26, ARKWEB_ERR_BLOCKED_BY_RESPONSE = -27, ARKWEB_ERR_CLEARTEXT_NOT_PERMITTED = -29,<br>ARKWEB_ERR_BLOCKED_BY_CSP = -30, ARKWEB_ERR_H2_OR_QUIC_REQUIRED = -31, ARKWEB_ERR_BLOCKED_BY_ORB = -32, ARKWEB_ERR_CONNECTION_CLOSED = -100,<br>ARKWEB_ERR_CONNECTION_RESET = -101, ARKWEB_ERR_CONNECTION_REFUSED = -102, ARKWEB_ERR_CONNECTION_ABORTED = -103, ARKWEB_ERR_CONNECTION_FAILED = -104,<br>ARKWEB_ERR_NAME_NOT_RESOLVED = -105, ARKWEB_ERR_INTERNET_DISCONNECTED = -106, ARKWEB_ERR_SSL_PROTOCOL_ERROR = -107, ARKWEB_ERR_ADDRESS_INVALID = -108,<br>ARKWEB_ERR_ADDRESS_UNREACHABLE = -109, ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110, ARKWEB_ERR_TUNNEL_CONNECTION_FAILED = -111, ARKWEB_ERR_NO_SSL_VERSIONS_ENABLED = -112,<br>ARKWEB_ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113, ARKWEB_ERR_SSL_RENEGOTIATION_REQUESTED = -114, ARKWEB_ERR_PROXY_AUTH_UNSUPPORTED = -115, ARKWEB_ERR_BAD_SSL_CLIENT_AUTH_CERT = -117,<br>ARKWEB_ERR_CONNECTION_TIMED_OUT = -118, ARKWEB_ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119, ARKWEB_ERR_SOCKS_CONNECTION_FAILED = -120, ARKWEB_ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121,<br>ARKWEB_ERR_ALPN_NEGOTIATION_FAILED = -122, ARKWEB_ERR_SSL_NO_RENEGOTIATION = -123, ARKWEB_ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124, ARKWEB_ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125,<br>ARKWEB_ERR_SSL_BAD_RECORD_MAC_ALERT = -126, ARKWEB_ERR_PROXY_AUTH_REQUESTED = -127, ARKWEB_ERR_PROXY_CONNECTION_FAILED = -130, ARKWEB_ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131,<br>ARKWEB_ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133, ARKWEB_ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134, ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135, ARKWEB_ERR_PROXY_CERTIFICATE_INVALID = -136,<br>ARKWEB_ERR_NAME_RESOLUTION_FAILED = -137, ARKWEB_ERR_NETWORK_ACCESS_DENIED = -138, ARKWEB_ERR_TEMPORARILY_THROTTLED = -139, ARKWEB_ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140,<br>ARKWEB_ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141, ARKWEB_ERR_MSG_TOO_BIG = -142, ARKWEB_ERR_WS_PROTOCOL_ERROR = -145, ARKWEB_ERR_ADDRESS_IN_USE = -147,<br>ARKWEB_ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148, ARKWEB_ERR_SSL_BAD_PEER_PUBLIC_KEY = -149, ARKWEB_ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150, ARKWEB_ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151,<br>ARKWEB_ERR_SSL_DECRYPT_ERROR_ALERT = -153, ARKWEB_ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154, ARKWEB_ERR_SSL_SERVER_CERT_CHANGED = -156, ARKWEB_ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159,<br>ARKWEB_ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160, ARKWEB_ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161, ARKWEB_ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162, ARKWEB_ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163,<br>ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164, ARKWEB_ERR_ICANN_NAME_COLLISION = -166, ARKWEB_ERR_SSL_SERVER_CERT_BAD_FORMAT = -167, ARKWEB_ERR_CT_STH_PARSING_FAILED = -168,<br>ARKWEB_ERR_CT_STH_INCOMPLETE = -169, ARKWEB_ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170, ARKWEB_ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171, ARKWEB_ERR_SSL_OBSOLETE_CIPHER = -172,<br>ARKWEB_ERR_WS_UPGRADE = -173, ARKWEB_ERR_READ_IF_READY_NOT_IMPLEMENTED = -174, ARKWEB_ERR_NO_BUFFER_SPACE = -176, ARKWEB_ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177,<br>ARKWEB_ERR_EARLY_DATA_REJECTED = -178, ARKWEB_ERR_WRONG_VERSION_ON_EARLY_DATA = -179, ARKWEB_ERR_TLS13_DOWNGRADE_DETECTED = -180, ARKWEB_ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181,<br>ARKWEB_ERR_INVALID_ECH_CONFIG_LIST = -182, ARKWEB_ERR_ECH_NOT_NEGOTIATED = -183, ARKWEB_ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184, ARKWEB_ERR_CERT_COMMON_NAME_INVALID = -200,<br>ARKWEB_ERR_CERT_DATE_INVALID = -201, ARKWEB_ERR_CERT_AUTHORITY_INVALID = -202, ARKWEB_ERR_CERT_CONTAINS_ERRORS = -203, ARKWEB_ERR_CERT_NO_REVOCATION_MECHANISM = -204,<br>ARKWEB_ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205, ARKWEB_ERR_CERT_REVOKED = -206, ARKWEB_ERR_CERT_INVALID = -207, ARKWEB_ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208,<br>ARKWEB_ERR_CERT_NON_UNIQUE_NAME = -210, ARKWEB_ERR_CERT_WEAK_KEY = -211, ARKWEB_ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212, ARKWEB_ERR_CERT_VALIDITY_TOO_LONG = -213,<br>ARKWEB_ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214, ARKWEB_ERR_CERT_SYMANTEC_LEGACY = -215, ARKWEB_ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217, ARKWEB_ERR_SSL_OBSOLETE_VERSION_OR_CIPHER = -218,<br>ARKWEB_ERR_CERT_END = -219, ARKWEB_ERR_INVALID_URL = -300, ARKWEB_ERR_DISALLOWED_URL_SCHEME = -301, ARKWEB_ERR_UNKNOWN_URL_SCHEME = -302,<br>ARKWEB_ERR_INVALID_REDIRECT = -303, ARKWEB_ERR_TOO_MANY_REDIRECTS = -310, ARKWEB_ERR_UNSAFE_REDIRECT = -311, ARKWEB_ERR_UNSAFE_PORT = -312,<br>ARKWEB_ERR_INVALID_RESPONSE = -320, ARKWEB_ERR_INVALID_CHUNKED_ENCODING = -321, ARKWEB_ERR_METHOD_UNSUPPORTED = -322, ARKWEB_ERR_UNEXPECTED_PROXY_AUTH = -323,<br>ARKWEB_ERR_EMPTY_RESPONSE = -324, ARKWEB_ERR_RESPONSE_HEADERS_TOO_BIG = -325, ARKWEB_ERR_PAC_SCRIPT_FAILED = -327, ARKWEB_ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328,<br>ARKWEB_ERR_MALFORMED_IDENTITY = -329, ARKWEB_ERR_CONTENT_DECODING_FAILED = -330, ARKWEB_ERR_NETWORK_IO_SUSPENDED = -331, ARKWEB_ERR_SYN_REPLY_NOT_RECEIVED = -332,<br>ARKWEB_ERR_ENCODING_CONVERSION_FAILED = -333, ARKWEB_ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334, ARKWEB_ERR_NO_SUPPORTED_PROXIES = -336, ARKWEB_ERR_HTTP2_PROTOCOL_ERROR = -337,<br>ARKWEB_ERR_INVALID_AUTH_CREDENTIALS = -338, ARKWEB_ERR_UNSUPPORTED_AUTH_SCHEME = -339, ARKWEB_ERR_ENCODING_DETECTION_FAILED = -340, ARKWEB_ERR_MISSING_AUTH_CREDENTIALS = -341,<br>ARKWEB_ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342, ARKWEB_ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343, ARKWEB_ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344, ARKWEB_ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345,<br>ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346, ARKWEB_ERR_INCOMPLETE_HTTP2_HEADERS = -347, ARKWEB_ERR_PAC_NOT_IN_DHCP = -348, ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349,<br>ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350, ARKWEB_ERR_HTTP2_SERVER_REFUSED_STREAM = -351, ARKWEB_ERR_HTTP2_PING_FAILED = -352, ARKWEB_ERR_CONTENT_LENGTH_MISMATCH = -354,<br>ARKWEB_ERR_INCOMPLETE_CHUNKED_ENCODING = -355, ARKWEB_ERR_QUIC_PROTOCOL_ERROR = -356, ARKWEB_ERR_RESPONSE_HEADERS_TRUNCATED = -357, ARKWEB_ERR_QUIC_HANDSHAKE_FAILED = -358,<br>ARKWEB_ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360, ARKWEB_ERR_HTTP2_FLOW_CONTROL_ERROR = -361, ARKWEB_ERR_HTTP2_FRAME_SIZE_ERROR = -362, ARKWEB_ERR_HTTP2_COMPRESSION_ERROR = -363,<br>ARKWEB_ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364, ARKWEB_ERR_HTTP_1_1_REQUIRED = -365, ARKWEB_ERR_PROXY_HTTP_1_1_REQUIRED = -366, ARKWEB_ERR_PAC_SCRIPT_TERMINATED = -367,<br>ARKWEB_ERR_INVALID_HTTP_RESPONSE = -370, ARKWEB_ERR_CONTENT_DECODING_INIT_FAILED = -371, ARKWEB_ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372, ARKWEB_ERR_HTTP2_PUSHED_STREAM_NOT_AVAILABLE = -373,<br>ARKWEB_ERR_HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER = -374, ARKWEB_ERR_TOO_MANY_RETRIES = -375, ARKWEB_ERR_HTTP2_STREAM_CLOSED = -376, ARKWEB_ERR_HTTP2_CLIENT_REFUSED_STREAM = -377,<br>ARKWEB_ERR_HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH = -378, ARKWEB_ERR_HTTP_RESPONSE_CODE_FAILURE = -379, ARKWEB_ERR_QUIC_UNKNOWN_CERT_ROOT = -380, ARKWEB_ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381,<br>ARKWEB_ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382, ARKWEB_ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383, ARKWEB_ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_LOCAL_NETWORK_ACCESS_POLICY = -384, ARKWEB_ERR_CACHE_MISS = -400,<br>ARKWEB_ERR_CACHE_READ_FAILURE = -401, ARKWEB_ERR_CACHE_WRITE_FAILURE = -402, ARKWEB_ERR_CACHE_OPERATION_UNSUPPORTED = -403, ARKWEB_ERR_CACHE_OPEN_FAILURE = -404,<br>ARKWEB_ERR_CACHE_CREATE_FAILURE = -405, ARKWEB_ERR_CACHE_RACE = -406, ARKWEB_ERR_CACHE_CHECKSUM_READ_FAILURE = -407, ARKWEB_ERR_CACHE_CHECKSUM_MISMATCH = -408,<br>ARKWEB_ERR_CACHE_LOCK_TIMEOUT = -409, ARKWEB_ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410, ARKWEB_ERR_CACHE_ENTRY_NOT_SUITABLE = -411, ARKWEB_ERR_CACHE_DOOM_FAILURE = -412,<br>ARKWEB_ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413, ARKWEB_ERR_INSECURE_RESPONSE = -501, ARKWEB_ERR_NO_PRIVATE_KEY_FOR_CERT = -502, ARKWEB_ERR_ADD_USER_CERT_FAILED = -503,<br>ARKWEB_ERR_INVALID_SIGNED_EXCHANGE = -504, ARKWEB_ERR_INVALID_WEB_BUNDLE = -505, ARKWEB_ERR_TRUST_TOKEN_OPERATION_FAILED = -506, ARKWEB_ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507,<br>ARKWEB_ERR_FTP_FAILED = -601, ARKWEB_ERR_FTP_SERVICE_UNAVAILABLE = -602, ARKWEB_ERR_FTP_TRANSFER_ABORTED = -603, ARKWEB_ERR_FTP_FILE_BUSY = -604,<br>ARKWEB_ERR_FTP_SYNTAX_ERROR = -605, ARKWEB_ERR_FTP_COMMAND_UNSUPPORTED = -606, ARKWEB_ERR_FTP_BAD_COMMAND_SEQUENCE = -607, ARKWEB_ERR_PKCS12_IMPORT_BAD_PASSWORD = -701,<br>ARKWEB_ERR_PKCS12_IMPORT_FAILED = -702, ARKWEB_ERR_IMPORT_CA_CERT_NOT_CA = -703, ARKWEB_ERR_IMPORT_CERT_ALREADY_EXISTS = -704, ARKWEB_ERR_IMPORT_CA_CERT_FAILED = -705,<br>ARKWEB_ERR_IMPORT_SERVER_CERT_FAILED = -706, ARKWEB_ERR_PKCS12_IMPORT_INVALID_MAC = -707, ARKWEB_ERR_PKCS12_IMPORT_INVALID_FILE = -708, ARKWEB_ERR_PKCS12_IMPORT_UNSUPPORTED = -709,<br>ARKWEB_ERR_KEY_GENERATION_FAILED = -710, ARKWEB_ERR_PRIVATE_KEY_EXPORT_FAILED = -712, ARKWEB_ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713, ARKWEB_ERR_CERT_DATABASE_CHANGED = -714,<br>ARKWEB_ERR_CERT_VERIFIER_CHANGED = -716, ARKWEB_ERR_DNS_MALFORMED_RESPONSE = -800, ARKWEB_ERR_DNS_SERVER_REQUIRES_TCP = -801, ARKWEB_ERR_DNS_SERVER_FAILED = -802,<br>ARKWEB_ERR_DNS_TIMED_OUT = -803, ARKWEB_ERR_DNS_CACHE_MISS = -804, ARKWEB_ERR_DNS_SEARCH_EMPTY = -805, ARKWEB_ERR_DNS_SORT_ERROR = -806,<br>ARKWEB_ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808, ARKWEB_ERR_DNS_NAME_HTTPS_ONLY = -809, ARKWEB_ERR_DNS_REQUEST_CANCELED = -810, ARKWEB_ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811<br>} | Enumerates the error codes of the ArkWeb network protocol stack. | 96e41f4b71Sopenharmony_ci| [ArkWeb_CustomSchemeOption](#arkweb_customschemeoption) {<br>**OH_ARKWEB_SCHEME_OPTION_NONE** = 0, ARKWEB_SCHEME_OPTION_STANDARD = 1 << 0, ARKWEB_SCHEME_OPTION_LOCAL = 1 << 1, ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2,<br>ARKWEB_SCHEME_OPTION_SECURE = 1 << 3, ARKWEB_SCHEME_OPTION_CORS_ENABLED = 1 << 4, ARKWEB_SCHEME_OPTION_CSP_BYPASSING = 1 << 5, ARKWEB_SCHEME_OPTION_FETCH_ENABLED = 1 << 6,<br>ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED = 1 << 7<br>} | Enumerates the custom scheme options. | 97e41f4b71Sopenharmony_ci| [ArkWeb_ResourceType](#arkweb_resourcetype) {<br>MAIN_FRAME = 0, SUB_FRAME = 1, STYLE_SHEET = 2, SCRIPT = 3,<br>IMAGE = 4, FONT_RESOURCE = 5, SUB_RESOURCE = 6, OBJECT = 7,<br>MEDIA = 8, WORKER = 9, SHARED_WORKER = 10, PREFETCH = 11,<br>FAVICON = 12, XHR = 13, PING = 14, SERVICE_WORKER = 15,<br>CSP_REPORT = 16, PLUGIN_RESOURCE = 17, NAVIGATION_PRELOAD_MAIN_FRAME = 19, NAVIGATION_PRELOAD_SUB_FRAME = 20<br>} | Enumerates the resource types. | 98e41f4b71Sopenharmony_ci| [ArkWeb_WebMessageType](#arkweb_webmessagetype) { ARKWEB_NONE = 0, ARKWEB_STRING, ARKWEB_BUFFER } | Enumerates the data types of post message. | 99e41f4b71Sopenharmony_ci 100e41f4b71Sopenharmony_ci 101e41f4b71Sopenharmony_ci### Functions 102e41f4b71Sopenharmony_ci 103e41f4b71Sopenharmony_ci| Name| Description| 104e41f4b71Sopenharmony_ci| -------- | -------- | 105e41f4b71Sopenharmony_ci| [ArkWeb_AnyNativeAPI](_ark_web___any_native_a_p_i.md) \* [OH_ArkWeb_GetNativeAPI](#oh_arkweb_getnativeapi) ([ArkWeb_NativeAPIVariantKind](#arkweb_nativeapivariantkind) type) | Obtains the native API struct based on the transferred API type. | 106e41f4b71Sopenharmony_ci| void [OH_ArkWebRequestHeaderList_Destroy](#oh_arkwebrequestheaderlist_destroy) ([ArkWeb_RequestHeaderList](#arkweb_requestheaderlist) \*requestHeaderList) | Destroys an **ArkWeb_RequestHeaderList** object. | 107e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebRequestHeaderList_GetSize](#oh_arkwebrequestheaderlist_getsize) (const [ArkWeb_RequestHeaderList](#arkweb_requestheaderlist) \*requestHeaderList) | Obtains the size of a request header list. | 108e41f4b71Sopenharmony_ci| void [OH_ArkWebRequestHeaderList_GetHeader](#oh_arkwebrequestheaderlist_getheader) (const [ArkWeb_RequestHeaderList](#arkweb_requestheaderlist) \*requestHeaderList, int32_t index, char \*\*key, char \*\*value) | Obtains a specified request header. | 109e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResourceRequest_SetUserData](#oh_arkwebresourcerequest_setuserdata) ([ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest, void \*userData) | Sets user data to the **ArkWeb_ResourceRequest** object. | 110e41f4b71Sopenharmony_ci| void \* [OH_ArkWebResourceRequest_GetUserData](#oh_arkwebresourcerequest_getuserdata) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest) | Obtains user data from **ArkWeb_ResourceRequest**. | 111e41f4b71Sopenharmony_ci| void [OH_ArkWebResourceRequest_GetMethod](#oh_arkwebresourcerequest_getmethod) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest, char \*\*method) | Obtains the method of a request. | 112e41f4b71Sopenharmony_ci| void [OH_ArkWebResourceRequest_GetUrl](#oh_arkwebresourcerequest_geturl) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest, char \*\*url) | Obtains the URL of a request. | 113e41f4b71Sopenharmony_ci| void [OH_ArkWebResourceRequest_GetHttpBodyStream](#oh_arkwebresourcerequest_gethttpbodystream) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest, [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*\*httpBodyStream) | Creates an **ArkWeb_HttpBodyStream** to read the uploaded data of the request. | 114e41f4b71Sopenharmony_ci| void [OH_ArkWebResourceRequest_DestroyHttpBodyStream](#oh_arkwebresourcerequest_destroyhttpbodystream) ([ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream) | Destroys an **ArkWeb_HttpBodyStream** object. | 115e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResourceRequest_GetResourceType](#oh_arkwebresourcerequest_getresourcetype) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest) | Obtains the resource type of a request. | 116e41f4b71Sopenharmony_ci| void [OH_ArkWebResourceRequest_GetFrameUrl](#oh_arkwebresourcerequest_getframeurl) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest, char \*\*frameUrl) | Obtains the URL of the frame that triggers the request. | 117e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebHttpBodyStream_SetUserData](#oh_arkwebhttpbodystream_setuserdata) ([ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream, void \*userData) | Sets user data to the **ArkWeb_HttpBodyStream** object. | 118e41f4b71Sopenharmony_ci| void \* [OH_ArkWebHttpBodyStream_GetUserData](#oh_arkwebhttpbodystream_getuserdata) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream) | Obtains user data from **ArkWeb_HttpBodyStream**. | 119e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebHttpBodyStream_SetReadCallback](#oh_arkwebhttpbodystream_setreadcallback) ([ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream, [ArkWeb_HttpBodyStreamReadCallback](#arkweb_httpbodystreamreadcallback) readCallback) | Sets a callback for **OH_ArkWebHttpBodyStream_Read**. | 120e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebHttpBodyStream_Init](#oh_arkwebhttpbodystream_init) ([ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream, [ArkWeb_HttpBodyStreamInitCallback](#arkweb_httpbodystreaminitcallback) initCallback) | Initializes **ArkWeb_HttpBodyStream**. | 121e41f4b71Sopenharmony_ci| void [OH_ArkWebHttpBodyStream_Read](#oh_arkwebhttpbodystream_read) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream, uint8_t \*buffer, int bufLen) | Exports upload data of the request to the buffer. | 122e41f4b71Sopenharmony_ci| uint64_t [OH_ArkWebHttpBodyStream_GetSize](#oh_arkwebhttpbodystream_getsize) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream) | Obtains the size of **httpBodyStream**. | 123e41f4b71Sopenharmony_ci| uint64_t [OH_ArkWebHttpBodyStream_GetPosition](#oh_arkwebhttpbodystream_getposition) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream) | Obtains the position of **httpBodyStream**. | 124e41f4b71Sopenharmony_ci| bool [OH_ArkWebHttpBodyStream_IsChunked](#oh_arkwebhttpbodystream_ischunked) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream) | Determines whether **httpBodyStream** is chunked to transfer. | 125e41f4b71Sopenharmony_ci| bool [OH_ArkWebHttpBodyStream_IsEof](#oh_arkwebhttpbodystream_iseof) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream) | Returns **true** if all data in **httpBodyStream** is read. | 126e41f4b71Sopenharmony_ci| bool [OH_ArkWebHttpBodyStream_IsInMemory](#oh_arkwebhttpbodystream_isinmemory) (const [ArkWeb_HttpBodyStream](#arkweb_httpbodystream) \*httpBodyStream) | Returns **true** if all the uploaded data in **httpBodyStream** is in memory and all read requests will be synchronized successfully. | 127e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResourceRequest_Destroy](#oh_arkwebresourcerequest_destroy) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest) | Destroys an **ArkWeb_ResourceRequest** object. | 128e41f4b71Sopenharmony_ci| void [OH_ArkWebResourceRequest_GetReferrer](#oh_arkwebresourcerequest_getreferrer) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest, char \*\*referrer) | Obtains the **Referrer** of a request. | 129e41f4b71Sopenharmony_ci| void [OH_ArkWebResourceRequest_GetRequestHeaders](#oh_arkwebresourcerequest_getrequestheaders) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest, [ArkWeb_RequestHeaderList](#arkweb_requestheaderlist) \*\*requestHeaderList) | Obtains the **OH_ArkWeb_RequestHeaderList** of a request. | 130e41f4b71Sopenharmony_ci| bool [OH_ArkWebResourceRequest_IsRedirect](#oh_arkwebresourcerequest_isredirect) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest) | Determines whether a request is redirect. | 131e41f4b71Sopenharmony_ci| bool [OH_ArkWebResourceRequest_IsMainFrame](#oh_arkwebresourcerequest_ismainframe) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest) | Determines whether a request is from the main frame. | 132e41f4b71Sopenharmony_ci| bool [OH_ArkWebResourceRequest_HasGesture](#oh_arkwebresourcerequest_hasgesture) (const [ArkWeb_ResourceRequest](#arkweb_resourcerequest) \*resourceRequest) | Determines whether a request is triggered by the user gesture. | 133e41f4b71Sopenharmony_ci| int32_t [OH_ArkWeb_RegisterCustomSchemes](#oh_arkweb_registercustomschemes) (const char \*scheme, int32_t option) | Registers a custom scheme with the **ArkWeb**. | 134e41f4b71Sopenharmony_ci| bool [OH_ArkWebServiceWorker_SetSchemeHandler](#oh_arkwebserviceworker_setschemehandler) (const char \*scheme, [ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler) | Sets an **ArkWeb_SchemeHandler** for a specified scheme to intercept requests of this scheme triggered by **ServiceWorker**. | 135e41f4b71Sopenharmony_ci| bool [OH_ArkWeb_SetSchemeHandler](#oh_arkweb_setschemehandler) (const char \*scheme, const char \*webTag, [ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler) | Sets an **ArkWeb_SchemeHandler** for a specified scheme to intercept requests of this scheme. | 136e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebServiceWorker_ClearSchemeHandlers](#oh_arkwebserviceworker_clearschemehandlers) () | Clears the **SchemeHandler** registered for **ServiceWorker**. | 137e41f4b71Sopenharmony_ci| int32_t [OH_ArkWeb_ClearSchemeHandlers](#oh_arkweb_clearschemehandlers) (const char \*webTag) | Clears the **SchemeHandler** registered for the specified web. | 138e41f4b71Sopenharmony_ci| void [OH_ArkWeb_CreateSchemeHandler](#oh_arkweb_createschemehandler) ([ArkWeb_SchemeHandler](#arkweb_schemehandler) \*\*schemeHandler) | Creates an **ArkWeb_SchemeHandler** object. | 139e41f4b71Sopenharmony_ci| void [OH_ArkWeb_DestroySchemeHandler](#oh_arkweb_destroyschemehandler) ([ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler) | Destroys an **ArkWeb_SchemeHandler** object. | 140e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebSchemeHandler_SetUserData](#oh_arkwebschemehandler_setuserdata) ([ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler, void \*userData) | Sets a user data to the **ArkWeb_SchemeHandler** object. | 141e41f4b71Sopenharmony_ci| void \* [OH_ArkWebSchemeHandler_GetUserData](#oh_arkwebschemehandler_getuserdata) (const [ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler) | Obtains the user data from **ArkWeb_SchemeHandler**. | 142e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebSchemeHandler_SetOnRequestStart](#oh_arkwebschemehandler_setonrequeststart) ([ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler, [ArkWeb_OnRequestStart](#arkweb_onrequeststart) onRequestStart) | Sets an **OnRequestStart** callback for **SchemeHandler**. | 143e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebSchemeHandler_SetOnRequestStop](#oh_arkwebschemehandler_setonrequeststop) ([ArkWeb_SchemeHandler](#arkweb_schemehandler) \*schemeHandler, [ArkWeb_OnRequestStop](#arkweb_onrequeststop) onRequestStop) | Sets an **OnRequestStop** callback for **SchemeHandler**. | 144e41f4b71Sopenharmony_ci| void [OH_ArkWeb_CreateResponse](#oh_arkweb_createresponse) ([ArkWeb_Response](#arkweb_response) \*\*response) | Creates an **ArkWeb_Response** object for the intercepted request. | 145e41f4b71Sopenharmony_ci| void [OH_ArkWeb_DestroyResponse](#oh_arkweb_destroyresponse) ([ArkWeb_Response](#arkweb_response) \*response) | Destroys an **ArkWeb_Response** object. | 146e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResponse_SetUrl](#oh_arkwebresponse_seturl) ([ArkWeb_Response](#arkweb_response) \*response, const char \*url) | Sets the parsed URL that is redirected or changed due to HSTS. After the setting, redirection is triggered. | 147e41f4b71Sopenharmony_ci| void [OH_ArkWebResponse_GetUrl](#oh_arkwebresponse_geturl) (const [ArkWeb_Response](#arkweb_response) \*response, char \*\*url) | Obtains the parsed URL that is redirected or changed due to HSTS. | 148e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResponse_SetError](#oh_arkwebresponse_seterror) ([ArkWeb_Response](#arkweb_response) \*response, [ArkWeb_NetError](#arkweb_neterror) errorCode) | Sets an error code for the **ArkWeb_Response** object. | 149e41f4b71Sopenharmony_ci| [ArkWeb_NetError](#arkweb_neterror) [OH_ArkWebResponse_GetError](#oh_arkwebresponse_geterror) (const [ArkWeb_Response](#arkweb_response) \*response) | Obtains the error code of **ArkWeb_Response**. | 150e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResponse_SetStatus](#oh_arkwebresponse_setstatus) ([ArkWeb_Response](#arkweb_response) \*response, int status) | Sets an HTTP status code for the **ArkWeb_Response** object. | 151e41f4b71Sopenharmony_ci| int [OH_ArkWebResponse_GetStatus](#oh_arkwebresponse_getstatus) (const [ArkWeb_Response](#arkweb_response) \*response) | Obtains the HTTP status code of **ArkWeb_Response**. | 152e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResponse_SetStatusText](#oh_arkwebresponse_setstatustext) ([ArkWeb_Response](#arkweb_response) \*response, const char \*statusText) | Sets the status text for **ArkWeb_Response**. | 153e41f4b71Sopenharmony_ci| void [OH_ArkWebResponse_GetStatusText](#oh_arkwebresponse_getstatustext) (const [ArkWeb_Response](#arkweb_response) \*response, char \*\*statusText) | Obtains the status text of **ArkWeb_Response**. | 154e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResponse_SetMimeType](#oh_arkwebresponse_setmimetype) ([ArkWeb_Response](#arkweb_response) \*response, const char \*mimeType) | Sets the mime type for **ArkWeb_Response**. | 155e41f4b71Sopenharmony_ci| void [OH_ArkWebResponse_GetMimeType](#oh_arkwebresponse_getmimetype) (const [ArkWeb_Response](#arkweb_response) \*response, char \*\*mimeType) | Obtains the mime type of **ArkWeb_Response**. | 156e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResponse_SetCharset](#oh_arkwebresponse_setcharset) ([ArkWeb_Response](#arkweb_response) \*response, const char \*charset) | Sets the character set for **ArkWeb_Response**. | 157e41f4b71Sopenharmony_ci| void [OH_ArkWebResponse_GetCharset](#oh_arkwebresponse_getcharset) (const [ArkWeb_Response](#arkweb_response) \*response, char \*\*charset) | Obtains the character set of **ArkWeb_Response**. | 158e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResponse_SetHeaderByName](#oh_arkwebresponse_setheaderbyname) ([ArkWeb_Response](#arkweb_response) \*response, const char \*name, const char \*value, bool overwrite) | Sets a header for **ArkWeb_Response**. | 159e41f4b71Sopenharmony_ci| void [OH_ArkWebResponse_GetHeaderByName](#oh_arkwebresponse_getheaderbyname) (const [ArkWeb_Response](#arkweb_response) \*response, const char \*name, char \*\*value) | Obtains the header from **ArkWeb_Response**. | 160e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResourceHandler_Destroy](#oh_arkwebresourcehandler_destroy) (const [ArkWeb_ResourceHandler](#arkweb_resourcehandler) \*resourceHandler) | Destroys an **ArkWeb_ResourceHandler** object. | 161e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResourceHandler_DidReceiveResponse](#oh_arkwebresourcehandler_didreceiveresponse) (const [ArkWeb_ResourceHandler](#arkweb_resourcehandler) \*resourceHandler, const [ArkWeb_Response](#arkweb_response) \*response) | Sends a response header for this request. | 162e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResourceHandler_DidReceiveData](#oh_arkwebresourcehandler_didreceivedata) (const [ArkWeb_ResourceHandler](#arkweb_resourcehandler) \*resourceHandler, const uint8_t \*buffer, int64_t bufLen) | Sends a response body for this request. | 163e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResourceHandler_DidFinish](#oh_arkwebresourcehandler_didfinish) (const [ArkWeb_ResourceHandler](#arkweb_resourcehandler) \*resourceHandler) | Notifies the ArkWeb kernel that the request is intercepted and that no more data is available. | 164e41f4b71Sopenharmony_ci| int32_t [OH_ArkWebResourceHandler_DidFailWithError](#oh_arkwebresourcehandler_didfailwitherror) (const [ArkWeb_ResourceHandler](#arkweb_resourcehandler) \*resourceHandler, [ArkWeb_NetError](#arkweb_neterror) errorCode) | Notifies the ArkWeb kernel that the intercepted request fails. | 165e41f4b71Sopenharmony_ci| void [OH_ArkWeb_ReleaseString](#oh_arkweb_releasestring) (char \*string) | Releases the string created by NDK APIs. | 166e41f4b71Sopenharmony_ci| void [OH_ArkWeb_ReleaseByteArray](#oh_arkweb_releasebytearray) (uint8_t \*byteArray) | Releases the byte array created by NDK APIs. | 167e41f4b71Sopenharmony_ci| void [OH_NativeArkWeb_RunJavaScript](#oh_nativearkweb_runjavascript) (const char \*webTag, const char \*jsCode, [NativeArkWeb_OnJavaScriptCallback](#nativearkweb_onjavascriptcallback) callback) | Runs a piece of JavaScript code in the displaying page. | 168e41f4b71Sopenharmony_ci| void [OH_NativeArkWeb_RegisterJavaScriptProxy](#oh_nativearkweb_registerjavascriptproxy) (const char \*webTag, const char \*objName, const char \*\*methodList, [NativeArkWeb_OnJavaScriptProxyCallback](#nativearkweb_onjavascriptproxycallback) \*callback, int32_t size, bool needRefresh) | Lists the registered objects and function names. | 169e41f4b71Sopenharmony_ci| void [OH_NativeArkWeb_UnregisterJavaScriptProxy](#oh_nativearkweb_unregisterjavascriptproxy) (const char \*webTag, const char \*objName) | Deletes a registered object and its callback. | 170e41f4b71Sopenharmony_ci| void [OH_NativeArkWeb_SetJavaScriptProxyValidCallback](#oh_nativearkweb_setjavascriptproxyvalidcallback) (const char \*webTag, [NativeArkWeb_OnValidCallback](#nativearkweb_onvalidcallback) callback) | Sets a callback used when an object is valid. | 171e41f4b71Sopenharmony_ci| [NativeArkWeb_OnValidCallback](#nativearkweb_onvalidcallback) [OH_NativeArkWeb_GetJavaScriptProxyValidCallback](#oh_nativearkweb_getjavascriptproxyvalidcallback) (const char \*webTag) | Obtains the callback used when a registered object is valid. | 172e41f4b71Sopenharmony_ci| void [OH_NativeArkWeb_SetDestroyCallback](#oh_nativearkweb_setdestroycallback) (const char \*webTag, [NativeArkWeb_OnDestroyCallback](#nativearkweb_ondestroycallback) callback) | Sets a callback used when a component is destroyed. | 173e41f4b71Sopenharmony_ci| [NativeArkWeb_OnDestroyCallback](#nativearkweb_ondestroycallback) [OH_NativeArkWeb_GetDestroyCallback](#oh_nativearkweb_getdestroycallback) (const char \*webTag) | Obtains the callback used when a registered component is destroyed. | 174e41f4b71Sopenharmony_ci 175e41f4b71Sopenharmony_ci## Macro Description 176e41f4b71Sopenharmony_ci 177e41f4b71Sopenharmony_ci 178e41f4b71Sopenharmony_ci### ARKWEB_MEMBER_EXISTS 179e41f4b71Sopenharmony_ci 180e41f4b71Sopenharmony_ci``` 181e41f4b71Sopenharmony_ci#define ARKWEB_MEMBER_EXISTS( s, f ) ((intptr_t) & ((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= *reinterpret_cast<size_t*>(s)) 182e41f4b71Sopenharmony_ci``` 183e41f4b71Sopenharmony_ci**Description** 184e41f4b71Sopenharmony_ci 185e41f4b71Sopenharmony_ciChecks whether the member variable exists in the struct. 186e41f4b71Sopenharmony_ci 187e41f4b71Sopenharmony_ci**Since**: 12 188e41f4b71Sopenharmony_ci 189e41f4b71Sopenharmony_ci 190e41f4b71Sopenharmony_ci### ARKWEB_MEMBER_MISSING 191e41f4b71Sopenharmony_ci 192e41f4b71Sopenharmony_ci``` 193e41f4b71Sopenharmony_ci#define ARKWEB_MEMBER_MISSING( s, f ) (!ARKWEB_MEMBER_EXISTS(s, f) || !((s)->f)) 194e41f4b71Sopenharmony_ci``` 195e41f4b71Sopenharmony_ci**Description** 196e41f4b71Sopenharmony_ci 197e41f4b71Sopenharmony_ciIf the member variable exists in the struct, **false** is returned. Otherwise, **true** is returned. 198e41f4b71Sopenharmony_ci 199e41f4b71Sopenharmony_ci**Since**: 12 200e41f4b71Sopenharmony_ci 201e41f4b71Sopenharmony_ci 202e41f4b71Sopenharmony_ci## Type Description 203e41f4b71Sopenharmony_ci 204e41f4b71Sopenharmony_ci 205e41f4b71Sopenharmony_ci### ArkWeb_CustomSchemeOption 206e41f4b71Sopenharmony_ci 207e41f4b71Sopenharmony_ci``` 208e41f4b71Sopenharmony_citypedef enum ArkWeb_CustomSchemeOption ArkWeb_CustomSchemeOption 209e41f4b71Sopenharmony_ci``` 210e41f4b71Sopenharmony_ci**Description** 211e41f4b71Sopenharmony_ci 212e41f4b71Sopenharmony_ciDefines an enum for the custom scheme options. 213e41f4b71Sopenharmony_ci 214e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 215e41f4b71Sopenharmony_ci 216e41f4b71Sopenharmony_ci**Since**: 12 217e41f4b71Sopenharmony_ci 218e41f4b71Sopenharmony_ci 219e41f4b71Sopenharmony_ci### ArkWeb_ErrorCode 220e41f4b71Sopenharmony_ci 221e41f4b71Sopenharmony_ci``` 222e41f4b71Sopenharmony_citypedef enum ArkWeb_ErrorCode ArkWeb_ErrorCode 223e41f4b71Sopenharmony_ci``` 224e41f4b71Sopenharmony_ci**Description** 225e41f4b71Sopenharmony_ci 226e41f4b71Sopenharmony_ciDefines an enum for the error codes of ArkWeb NDK APIs. 227e41f4b71Sopenharmony_ci 228e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 229e41f4b71Sopenharmony_ci 230e41f4b71Sopenharmony_ci**Since**: 12 231e41f4b71Sopenharmony_ci 232e41f4b71Sopenharmony_ci 233e41f4b71Sopenharmony_ci### ArkWeb_HttpBodyStream 234e41f4b71Sopenharmony_ci 235e41f4b71Sopenharmony_ci``` 236e41f4b71Sopenharmony_citypedef struct ArkWeb_HttpBodyStream_ ArkWeb_HttpBodyStream 237e41f4b71Sopenharmony_ci``` 238e41f4b71Sopenharmony_ci**Description** 239e41f4b71Sopenharmony_ci 240e41f4b71Sopenharmony_ciDefines a struct for the uploaded data of the request. 241e41f4b71Sopenharmony_ci 242e41f4b71Sopenharmony_ciUse the **OH_ArkWebHttpBodyStream_\*** API to read the uploaded data. 243e41f4b71Sopenharmony_ci 244e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 245e41f4b71Sopenharmony_ci 246e41f4b71Sopenharmony_ci**Since**: 12 247e41f4b71Sopenharmony_ci 248e41f4b71Sopenharmony_ci 249e41f4b71Sopenharmony_ci### ArkWeb_HttpBodyStreamInitCallback 250e41f4b71Sopenharmony_ci 251e41f4b71Sopenharmony_ci``` 252e41f4b71Sopenharmony_citypedef void(* ArkWeb_HttpBodyStreamInitCallback) (const ArkWeb_HttpBodyStream *httpBodyStream, ArkWeb_NetError result) 253e41f4b71Sopenharmony_ci``` 254e41f4b71Sopenharmony_ci**Description** 255e41f4b71Sopenharmony_ci 256e41f4b71Sopenharmony_ciDefines a callback used when **ArkWeb_HttpBodyStream** is initialized. 257e41f4b71Sopenharmony_ci 258e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 259e41f4b71Sopenharmony_ci 260e41f4b71Sopenharmony_ci**Since**: 12 261e41f4b71Sopenharmony_ci 262e41f4b71Sopenharmony_ci**Parameters** 263e41f4b71Sopenharmony_ci 264e41f4b71Sopenharmony_ci| Name| Description| 265e41f4b71Sopenharmony_ci| -------- | -------- | 266e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 267e41f4b71Sopenharmony_ci| result | If the operation is successful, **ARKWEB_NET_OK** is returned. Otherwise, see [arkweb_net_error_list.h](arkweb__net__error__list_8h.md).| 268e41f4b71Sopenharmony_ci 269e41f4b71Sopenharmony_ci 270e41f4b71Sopenharmony_ci### ArkWeb_HttpBodyStreamReadCallback 271e41f4b71Sopenharmony_ci 272e41f4b71Sopenharmony_ci``` 273e41f4b71Sopenharmony_citypedef void(* ArkWeb_HttpBodyStreamReadCallback) (const ArkWeb_HttpBodyStream *httpBodyStream, uint8_t *buffer, int bytesRead) 274e41f4b71Sopenharmony_ci``` 275e41f4b71Sopenharmony_ci**Description** 276e41f4b71Sopenharmony_ci 277e41f4b71Sopenharmony_ciDefines a callback used when **OH_ArkWebHttpBodyStream_Read** is complete. 278e41f4b71Sopenharmony_ci 279e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 280e41f4b71Sopenharmony_ci 281e41f4b71Sopenharmony_ci**Since**: 12 282e41f4b71Sopenharmony_ci 283e41f4b71Sopenharmony_ci**Parameters** 284e41f4b71Sopenharmony_ci 285e41f4b71Sopenharmony_ci| Name| Description| 286e41f4b71Sopenharmony_ci| -------- | -------- | 287e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 288e41f4b71Sopenharmony_ci| buffer | Buffer for receiving data. | 289e41f4b71Sopenharmony_ci| bytesRead | Callback used when **OH_ArkWebHttpBodyStream_Read** is complete. If the value of **bytesRead** is greater than 0, the **buffer** is filled with data of the **bytesRead** size. The caller can read data from the **buffer**. If **OH_ArkWebHttpBodyStream_IsEOF** is false, the caller can continue to read the data left.| 290e41f4b71Sopenharmony_ci 291e41f4b71Sopenharmony_ci 292e41f4b71Sopenharmony_ci### ArkWeb_NetError 293e41f4b71Sopenharmony_ci 294e41f4b71Sopenharmony_ci``` 295e41f4b71Sopenharmony_citypedef enum ArkWeb_NetError ArkWeb_NetError 296e41f4b71Sopenharmony_ci``` 297e41f4b71Sopenharmony_ci**Description** 298e41f4b71Sopenharmony_ci 299e41f4b71Sopenharmony_ciDefines an enum for the error codes of the ArkWeb network protocol stack. 300e41f4b71Sopenharmony_ci 301e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 302e41f4b71Sopenharmony_ci 303e41f4b71Sopenharmony_ci**Since**: 12 304e41f4b71Sopenharmony_ci 305e41f4b71Sopenharmony_ci 306e41f4b71Sopenharmony_ci### ArkWeb_OnComponentCallback 307e41f4b71Sopenharmony_ci 308e41f4b71Sopenharmony_ci``` 309e41f4b71Sopenharmony_citypedef void(* ArkWeb_OnComponentCallback) (const char *webTag, void *userData) 310e41f4b71Sopenharmony_ci``` 311e41f4b71Sopenharmony_ci**Description** 312e41f4b71Sopenharmony_ci 313e41f4b71Sopenharmony_ciDefines a callback used to return component event notification. 314e41f4b71Sopenharmony_ci 315e41f4b71Sopenharmony_ci**Since**: 12 316e41f4b71Sopenharmony_ci 317e41f4b71Sopenharmony_ci 318e41f4b71Sopenharmony_ci### ArkWeb_OnJavaScriptCallback 319e41f4b71Sopenharmony_ci 320e41f4b71Sopenharmony_ci``` 321e41f4b71Sopenharmony_citypedef void(* ArkWeb_OnJavaScriptCallback) (const char *webTag, const ArkWeb_JavaScriptBridgeData *data, void *userData) 322e41f4b71Sopenharmony_ci``` 323e41f4b71Sopenharmony_ci**Description** 324e41f4b71Sopenharmony_ci 325e41f4b71Sopenharmony_ciDefines a callback used when the injected JavaScript is executed. 326e41f4b71Sopenharmony_ci 327e41f4b71Sopenharmony_ci**Since**: 12 328e41f4b71Sopenharmony_ci 329e41f4b71Sopenharmony_ci 330e41f4b71Sopenharmony_ci### ArkWeb_OnJavaScriptProxyCallback 331e41f4b71Sopenharmony_ci 332e41f4b71Sopenharmony_ci``` 333e41f4b71Sopenharmony_citypedef void(* ArkWeb_OnJavaScriptProxyCallback) (const char *webTag, const ArkWeb_JavaScriptBridgeData *dataArray, size_t arraySize, void *userData) 334e41f4b71Sopenharmony_ci``` 335e41f4b71Sopenharmony_ci**Description** 336e41f4b71Sopenharmony_ci 337e41f4b71Sopenharmony_ciDefines a callback used when the proxy method is executed. 338e41f4b71Sopenharmony_ci 339e41f4b71Sopenharmony_ci**Since**: 12 340e41f4b71Sopenharmony_ci 341e41f4b71Sopenharmony_ci 342e41f4b71Sopenharmony_ci### ArkWeb_OnMessageEventHandler 343e41f4b71Sopenharmony_ci 344e41f4b71Sopenharmony_ci``` 345e41f4b71Sopenharmony_citypedef void(* ArkWeb_OnMessageEventHandler) (const char *webTag, const ArkWeb_WebMessagePortPtr port, const ArkWeb_WebMessagePtr message, void *userData) 346e41f4b71Sopenharmony_ci``` 347e41f4b71Sopenharmony_ci**Description** 348e41f4b71Sopenharmony_ci 349e41f4b71Sopenharmony_ciDefines a callback used to process the post message data sent by the HTML page. 350e41f4b71Sopenharmony_ci 351e41f4b71Sopenharmony_ci**Since**: 12 352e41f4b71Sopenharmony_ci 353e41f4b71Sopenharmony_ci**Parameters** 354e41f4b71Sopenharmony_ci 355e41f4b71Sopenharmony_ci| Name| Description| 356e41f4b71Sopenharmony_ci| -------- | -------- | 357e41f4b71Sopenharmony_ci| webTag | Name of the **Web** component. | 358e41f4b71Sopenharmony_ci| port | Post message port. | 359e41f4b71Sopenharmony_ci| message | Post message data. | 360e41f4b71Sopenharmony_ci| userData | User-defined data.| 361e41f4b71Sopenharmony_ci 362e41f4b71Sopenharmony_ci 363e41f4b71Sopenharmony_ci### ArkWeb_OnRequestStart 364e41f4b71Sopenharmony_ci 365e41f4b71Sopenharmony_ci``` 366e41f4b71Sopenharmony_citypedef void(* ArkWeb_OnRequestStart) (const ArkWeb_SchemeHandler *schemeHandler, ArkWeb_ResourceRequest *resourceRequest, const ArkWeb_ResourceHandler *resourceHandler, bool *intercept) 367e41f4b71Sopenharmony_ci``` 368e41f4b71Sopenharmony_ci**Description** 369e41f4b71Sopenharmony_ci 370e41f4b71Sopenharmony_ciDefines a callback used to start the request on the I/O thread. 371e41f4b71Sopenharmony_ci 372e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 373e41f4b71Sopenharmony_ci 374e41f4b71Sopenharmony_ci**Since**: 12 375e41f4b71Sopenharmony_ci 376e41f4b71Sopenharmony_ci**Parameters** 377e41f4b71Sopenharmony_ci 378e41f4b71Sopenharmony_ci| Name| Description| 379e41f4b71Sopenharmony_ci| -------- | -------- | 380e41f4b71Sopenharmony_ci| schemeHandler | ArkWeb_SchemeHandler. | 381e41f4b71Sopenharmony_ci| resourceRequest | The object used to obtain the request information. | 382e41f4b71Sopenharmony_ci| resourceHandler | **ArkWeb_ResourceHandler** of the request. If **intercept** is set to **false**, this parameter should not be used. | 383e41f4b71Sopenharmony_ci| intercept | If the value is **true**, the request will be intercepted. If the value is **false**, the request will not be intercepted.| 384e41f4b71Sopenharmony_ci 385e41f4b71Sopenharmony_ci 386e41f4b71Sopenharmony_ci### ArkWeb_OnRequestStop 387e41f4b71Sopenharmony_ci 388e41f4b71Sopenharmony_ci``` 389e41f4b71Sopenharmony_citypedef void(* ArkWeb_OnRequestStop) (const ArkWeb_SchemeHandler *schemeHandler, const ArkWeb_ResourceRequest *resourceRequest) 390e41f4b71Sopenharmony_ci``` 391e41f4b71Sopenharmony_ci**Description** 392e41f4b71Sopenharmony_ci 393e41f4b71Sopenharmony_ciDefines a callback used when the request is stopped. 394e41f4b71Sopenharmony_ci 395e41f4b71Sopenharmony_ciThis callback is used on the IO thread. 396e41f4b71Sopenharmony_ci 397e41f4b71Sopenharmony_ciThe **resourceRequest** can be destroyed using **ArkWeb_ResourceRequest_Destroy**, 398e41f4b71Sopenharmony_ci 399e41f4b71Sopenharmony_ciand **ArkWeb_ResourceHandler_Destroy** can be used to destroy the **ArkWeb_ResourceHandler** received in **ArkWeb_OnRequestStart**. 400e41f4b71Sopenharmony_ci 401e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 402e41f4b71Sopenharmony_ci 403e41f4b71Sopenharmony_ci**Since**: 12 404e41f4b71Sopenharmony_ci 405e41f4b71Sopenharmony_ci**Parameters** 406e41f4b71Sopenharmony_ci 407e41f4b71Sopenharmony_ci| Name| Description| 408e41f4b71Sopenharmony_ci| -------- | -------- | 409e41f4b71Sopenharmony_ci| schemeHandler | ArkWeb_SchemeHandler. | 410e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest.| 411e41f4b71Sopenharmony_ci 412e41f4b71Sopenharmony_ci 413e41f4b71Sopenharmony_ci### ArkWeb_RequestHeaderList 414e41f4b71Sopenharmony_ci 415e41f4b71Sopenharmony_ci``` 416e41f4b71Sopenharmony_citypedef struct ArkWeb_RequestHeaderList_ ArkWeb_RequestHeaderList 417e41f4b71Sopenharmony_ci``` 418e41f4b71Sopenharmony_ci**Description** 419e41f4b71Sopenharmony_ci 420e41f4b71Sopenharmony_ciDefines a struct for the request header list. 421e41f4b71Sopenharmony_ci 422e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 423e41f4b71Sopenharmony_ci 424e41f4b71Sopenharmony_ci**Since**: 12 425e41f4b71Sopenharmony_ci 426e41f4b71Sopenharmony_ci 427e41f4b71Sopenharmony_ci### ArkWeb_ResourceHandler 428e41f4b71Sopenharmony_ci 429e41f4b71Sopenharmony_ci``` 430e41f4b71Sopenharmony_citypedef struct ArkWeb_ResourceHandler_ ArkWeb_ResourceHandler 431e41f4b71Sopenharmony_ci``` 432e41f4b71Sopenharmony_ci**Description** 433e41f4b71Sopenharmony_ci 434e41f4b71Sopenharmony_ciDefines a struct for the intercepted URL requests. 435e41f4b71Sopenharmony_ci 436e41f4b71Sopenharmony_ciYou can use **ArkWeb_ResourceHandler** to send defined request headers and bodies. 437e41f4b71Sopenharmony_ci 438e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 439e41f4b71Sopenharmony_ci 440e41f4b71Sopenharmony_ci**Since**: 12 441e41f4b71Sopenharmony_ci 442e41f4b71Sopenharmony_ci 443e41f4b71Sopenharmony_ci### ArkWeb_ResourceRequest 444e41f4b71Sopenharmony_ci 445e41f4b71Sopenharmony_ci``` 446e41f4b71Sopenharmony_citypedef struct ArkWeb_ResourceRequest_ ArkWeb_ResourceRequest 447e41f4b71Sopenharmony_ci``` 448e41f4b71Sopenharmony_ci**Description** 449e41f4b71Sopenharmony_ci 450e41f4b71Sopenharmony_ciDefines a struct for resource request. Through **OH_ArkWeb_ResourceRequest**, you can obtain the URL, method, post data, and other information of the request. 451e41f4b71Sopenharmony_ci 452e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 453e41f4b71Sopenharmony_ci 454e41f4b71Sopenharmony_ci**Since**: 12 455e41f4b71Sopenharmony_ci 456e41f4b71Sopenharmony_ci 457e41f4b71Sopenharmony_ci### ArkWeb_ResourceType 458e41f4b71Sopenharmony_ci 459e41f4b71Sopenharmony_ci``` 460e41f4b71Sopenharmony_citypedef enum ArkWeb_ResourceType ArkWeb_ResourceType 461e41f4b71Sopenharmony_ci``` 462e41f4b71Sopenharmony_ci**Description** 463e41f4b71Sopenharmony_ci 464e41f4b71Sopenharmony_ciDefines an enum for the resource types. 465e41f4b71Sopenharmony_ci 466e41f4b71Sopenharmony_ciThe resource types match the corresponding items of ResourceType in Chromium and should not be renumbered. 467e41f4b71Sopenharmony_ci 468e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 469e41f4b71Sopenharmony_ci 470e41f4b71Sopenharmony_ci**Since**: 12 471e41f4b71Sopenharmony_ci 472e41f4b71Sopenharmony_ci 473e41f4b71Sopenharmony_ci### ArkWeb_Response 474e41f4b71Sopenharmony_ci 475e41f4b71Sopenharmony_ci``` 476e41f4b71Sopenharmony_citypedef struct ArkWeb_Response_ ArkWeb_Response 477e41f4b71Sopenharmony_ci``` 478e41f4b71Sopenharmony_ci**Description** 479e41f4b71Sopenharmony_ci 480e41f4b71Sopenharmony_ciDefines a struct for **ArkWeb_Response** for the intercepted request. 481e41f4b71Sopenharmony_ci 482e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 483e41f4b71Sopenharmony_ci 484e41f4b71Sopenharmony_ci**Since**: 12 485e41f4b71Sopenharmony_ci 486e41f4b71Sopenharmony_ci 487e41f4b71Sopenharmony_ci### ArkWeb_SchemeHandler 488e41f4b71Sopenharmony_ci 489e41f4b71Sopenharmony_ci``` 490e41f4b71Sopenharmony_citypedef struct ArkWeb_SchemeHandler_ ArkWeb_SchemeHandler 491e41f4b71Sopenharmony_ci``` 492e41f4b71Sopenharmony_ci**Description** 493e41f4b71Sopenharmony_ci 494e41f4b71Sopenharmony_ciDefines a struct for the **SchemeHandler** of a specified scheme. 495e41f4b71Sopenharmony_ci 496e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 497e41f4b71Sopenharmony_ci 498e41f4b71Sopenharmony_ci**Since**: 12 499e41f4b71Sopenharmony_ci 500e41f4b71Sopenharmony_ci 501e41f4b71Sopenharmony_ci### ArkWeb_WebMessagePortPtr 502e41f4b71Sopenharmony_ci 503e41f4b71Sopenharmony_ci``` 504e41f4b71Sopenharmony_citypedef struct ArkWeb_WebMessagePort* ArkWeb_WebMessagePortPtr 505e41f4b71Sopenharmony_ci``` 506e41f4b71Sopenharmony_ci**Description** 507e41f4b71Sopenharmony_ci 508e41f4b71Sopenharmony_ciDefines a struct for the pointer to the message port struct. 509e41f4b71Sopenharmony_ci 510e41f4b71Sopenharmony_ci**Since**: 12 511e41f4b71Sopenharmony_ci 512e41f4b71Sopenharmony_ci 513e41f4b71Sopenharmony_ci### ArkWeb_WebMessagePtr 514e41f4b71Sopenharmony_ci 515e41f4b71Sopenharmony_ci``` 516e41f4b71Sopenharmony_citypedef struct ArkWeb_WebMessage* ArkWeb_WebMessagePtr 517e41f4b71Sopenharmony_ci``` 518e41f4b71Sopenharmony_ci**Description** 519e41f4b71Sopenharmony_ci 520e41f4b71Sopenharmony_ciDefines a struct for the pointer to the data struct of post message. 521e41f4b71Sopenharmony_ci 522e41f4b71Sopenharmony_ci**Since**: 12 523e41f4b71Sopenharmony_ci 524e41f4b71Sopenharmony_ci 525e41f4b71Sopenharmony_ci### ArkWeb_WebMessageType 526e41f4b71Sopenharmony_ci 527e41f4b71Sopenharmony_ci``` 528e41f4b71Sopenharmony_citypedef enum ArkWeb_WebMessageType ArkWeb_WebMessageType 529e41f4b71Sopenharmony_ci``` 530e41f4b71Sopenharmony_ci**Description** 531e41f4b71Sopenharmony_ci 532e41f4b71Sopenharmony_ciDefines an enum for the data types of post message. 533e41f4b71Sopenharmony_ci 534e41f4b71Sopenharmony_ci**Since**: 12 535e41f4b71Sopenharmony_ci 536e41f4b71Sopenharmony_ci 537e41f4b71Sopenharmony_ci### NativeArkWeb_OnDestroyCallback 538e41f4b71Sopenharmony_ci 539e41f4b71Sopenharmony_ci``` 540e41f4b71Sopenharmony_citypedef void(* NativeArkWeb_OnDestroyCallback) (const char *) 541e41f4b71Sopenharmony_ci``` 542e41f4b71Sopenharmony_ci**Description** 543e41f4b71Sopenharmony_ci 544e41f4b71Sopenharmony_ciDefines a callback used when the \<Web> component is destroyed. 545e41f4b71Sopenharmony_ci 546e41f4b71Sopenharmony_ci**Since**: 11 547e41f4b71Sopenharmony_ci 548e41f4b71Sopenharmony_ci 549e41f4b71Sopenharmony_ci### NativeArkWeb_OnJavaScriptCallback 550e41f4b71Sopenharmony_ci 551e41f4b71Sopenharmony_ci``` 552e41f4b71Sopenharmony_citypedef void(* NativeArkWeb_OnJavaScriptCallback) (const char *) 553e41f4b71Sopenharmony_ci``` 554e41f4b71Sopenharmony_ci**Description** 555e41f4b71Sopenharmony_ci 556e41f4b71Sopenharmony_ciDefines a callback used to return the result after the JavaScript code is executed. 557e41f4b71Sopenharmony_ci 558e41f4b71Sopenharmony_ci**Since**: 11 559e41f4b71Sopenharmony_ci 560e41f4b71Sopenharmony_ci 561e41f4b71Sopenharmony_ci### NativeArkWeb_OnJavaScriptProxyCallback 562e41f4b71Sopenharmony_ci 563e41f4b71Sopenharmony_ci``` 564e41f4b71Sopenharmony_citypedef char*(* NativeArkWeb_OnJavaScriptProxyCallback) (const char **argv, int32_t argc) 565e41f4b71Sopenharmony_ci``` 566e41f4b71Sopenharmony_ci**Description** 567e41f4b71Sopenharmony_ci 568e41f4b71Sopenharmony_ciDefines a callback of the injected object. 569e41f4b71Sopenharmony_ci 570e41f4b71Sopenharmony_ci**Since**: 11 571e41f4b71Sopenharmony_ci 572e41f4b71Sopenharmony_ci 573e41f4b71Sopenharmony_ci### NativeArkWeb_OnValidCallback 574e41f4b71Sopenharmony_ci 575e41f4b71Sopenharmony_ci``` 576e41f4b71Sopenharmony_citypedef void(* NativeArkWeb_OnValidCallback) (const char *) 577e41f4b71Sopenharmony_ci``` 578e41f4b71Sopenharmony_ci**Description** 579e41f4b71Sopenharmony_ci 580e41f4b71Sopenharmony_ciDefines a callback used when the **Web** component is valid. 581e41f4b71Sopenharmony_ci 582e41f4b71Sopenharmony_ci**Since**: 11 583e41f4b71Sopenharmony_ci 584e41f4b71Sopenharmony_ci 585e41f4b71Sopenharmony_ci## Enum Description 586e41f4b71Sopenharmony_ci 587e41f4b71Sopenharmony_ci 588e41f4b71Sopenharmony_ci### ArkWeb_CustomSchemeOption 589e41f4b71Sopenharmony_ci 590e41f4b71Sopenharmony_ci``` 591e41f4b71Sopenharmony_cienum ArkWeb_CustomSchemeOption 592e41f4b71Sopenharmony_ci``` 593e41f4b71Sopenharmony_ci**Description** 594e41f4b71Sopenharmony_ci 595e41f4b71Sopenharmony_ciEnumerates the custom scheme options. 596e41f4b71Sopenharmony_ci 597e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 598e41f4b71Sopenharmony_ci 599e41f4b71Sopenharmony_ci**Since**: 12 600e41f4b71Sopenharmony_ci 601e41f4b71Sopenharmony_ci| Value| Description| 602e41f4b71Sopenharmony_ci| -------- | -------- | 603e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_OPTION_STANDARD | If **ARKWEB_SCHEME_OPTION_STANDARD** is set, the scheme is processed as a standard scheme. The standard scheme must comply with the URL normalization and parsing rules defined in section 3.1 of RFC 1738. The rules can be found in [http://www.ietf.org/rfc/rfc1738.txt](http://www.ietf.org/rfc/rfc1738.txt). | 604e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_OPTION_LOCAL | If **ARKWEB_SCHEME_OPTION_LOCAL** is set, the scheme is processed using the same security rule as the file URL. | 605e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED | If **ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED** is set, the request of the scheme can be initiated only by the page loaded using the same scheme. | 606e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_OPTION_SECURE | If **ARKWEB_SCHEME_OPTION_SECURE** is set, the scheme is processed using the same security rule as the https URL. | 607e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_OPTION_CORS_ENABLED | If **ARKWEB_SCHEME_OPTION_CORS_ENABLED** is set, the scheme can send CORS requests. In most cases, this value should be set when **ARKWEB_SCHEME_OPTION_STANDARD** is set. | 608e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_OPTION_CSP_BYPASSING | If **ARKWEB_SCHEME_OPTION_CSP_BYPASSING** is set, the scheme can bypass the Content Security Policy (CSP) check. In most cases, this value should not be set when **ARKWEB_SCHEME_OPTION_STANDARD** is set. | 609e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_OPTION_FETCH_ENABLED | If **ARKWEB_SCHEME_OPTION_FETCH_ENABLED** is set, the FETCH API request of the scheme can be initiated. | 610e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED | If **ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED** is set, the JS resources of the scheme support code cache. | 611e41f4b71Sopenharmony_ci 612e41f4b71Sopenharmony_ci 613e41f4b71Sopenharmony_ci### ArkWeb_ErrorCode 614e41f4b71Sopenharmony_ci 615e41f4b71Sopenharmony_ci``` 616e41f4b71Sopenharmony_cienum ArkWeb_ErrorCode 617e41f4b71Sopenharmony_ci``` 618e41f4b71Sopenharmony_ci**Description** 619e41f4b71Sopenharmony_ci 620e41f4b71Sopenharmony_ciEnumerates the error codes of ArkWeb NDK APIs. 621e41f4b71Sopenharmony_ci 622e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 623e41f4b71Sopenharmony_ci 624e41f4b71Sopenharmony_ci**Since**: 12 625e41f4b71Sopenharmony_ci 626e41f4b71Sopenharmony_ci| Value| Description| 627e41f4b71Sopenharmony_ci| -------- | -------- | 628e41f4b71Sopenharmony_ci| ARKWEB_SUCCESS | Successful execution. | 629e41f4b71Sopenharmony_ci| ARKWEB_INIT_ERROR | Failed initialization. | 630e41f4b71Sopenharmony_ci| ARKWEB_ERROR_UNKNOWN | Unknown error. | 631e41f4b71Sopenharmony_ci| ARKWEB_INVALID_PARAM | Invalid parameter. | 632e41f4b71Sopenharmony_ci| ARKWEB_SCHEME_REGISTER_FAILED | The scheme configuration failed to be registered. You need to register the scheme before creating the ArkWeb. | 633e41f4b71Sopenharmony_ci| ARKWEB_INVALID_URL | Invalid URL. | 634e41f4b71Sopenharmony_ci| ARKWEB_INVALID_COOKIE_VALUE | Invalid cookie value. | 635e41f4b71Sopenharmony_ci 636e41f4b71Sopenharmony_ci 637e41f4b71Sopenharmony_ci### ArkWeb_NativeAPIVariantKind 638e41f4b71Sopenharmony_ci 639e41f4b71Sopenharmony_ci``` 640e41f4b71Sopenharmony_cienum ArkWeb_NativeAPIVariantKind 641e41f4b71Sopenharmony_ci``` 642e41f4b71Sopenharmony_ci**Description** 643e41f4b71Sopenharmony_ci 644e41f4b71Sopenharmony_ciEnumerates the native API types. 645e41f4b71Sopenharmony_ci 646e41f4b71Sopenharmony_ci**Since**: 12 647e41f4b71Sopenharmony_ci 648e41f4b71Sopenharmony_ci| Value| Description| 649e41f4b71Sopenharmony_ci| -------- | -------- | 650e41f4b71Sopenharmony_ci| ARKWEB_NATIVE_COMPONENT | API types of the Web component. | 651e41f4b71Sopenharmony_ci| ARKWEB_NATIVE_CONTROLLER | API types of the Web controller. | 652e41f4b71Sopenharmony_ci| ARKWEB_NATIVE_WEB_MESSAGE_PORT | API types of the web message port. | 653e41f4b71Sopenharmony_ci| ARKWEB_NATIVE_WEB_MESSAGE | API types of the web message. | 654e41f4b71Sopenharmony_ci| ARKWEB_NATIVE_COOKIE_MANAGER | API types of the cookie manager. | 655e41f4b71Sopenharmony_ci 656e41f4b71Sopenharmony_ci 657e41f4b71Sopenharmony_ci### ArkWeb_NetError 658e41f4b71Sopenharmony_ci 659e41f4b71Sopenharmony_ci``` 660e41f4b71Sopenharmony_cienum ArkWeb_NetError 661e41f4b71Sopenharmony_ci``` 662e41f4b71Sopenharmony_ci**Description** 663e41f4b71Sopenharmony_ci 664e41f4b71Sopenharmony_ciEnumerates the error codes of the ArkWeb network protocol stack. 665e41f4b71Sopenharmony_ci 666e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 667e41f4b71Sopenharmony_ci 668e41f4b71Sopenharmony_ci**Since**: 12 669e41f4b71Sopenharmony_ci 670e41f4b71Sopenharmony_ci| Value| Description| 671e41f4b71Sopenharmony_ci| -------- | -------- | 672e41f4b71Sopenharmony_ci| ARKWEB_NET_OK | The operation is normal. | 673e41f4b71Sopenharmony_ci| ARKWEB_ERR_IO_PENDING | The asynchronous I/O operation is pending. This usually does not mean a fatal error. Typically, this error is generated as a notification to wait for an external notification indicating that the I/O operation is finally completed. | 674e41f4b71Sopenharmony_ci| ARKWEB_ERR_FAILED | The operation fails. | 675e41f4b71Sopenharmony_ci| ARKWEB_ERR_ABORTED | The operation is aborted (due to user operation). | 676e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_ARGUMENT | The parameter is invalid. | 677e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_HANDLE | The handle or file descriptor is invalid. | 678e41f4b71Sopenharmony_ci| ARKWEB_ERR_FILE_NOT_FOUND | The file or directory cannot be found. | 679e41f4b71Sopenharmony_ci| ARKWEB_ERR_TIMED_OUT | The operation timed out. | 680e41f4b71Sopenharmony_ci| ARKWEB_ERR_FILE_TOO_LARGE | The file is too large. | 681e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNEXPECTED | An unexpected error occurs. This may be caused by programming errors or invalid assumptions. | 682e41f4b71Sopenharmony_ci| ARKWEB_ERR_ACCESS_DENIED | The access to resources other than the network is denied. | 683e41f4b71Sopenharmony_ci| ARKWEB_ERR_NOT_IMPLEMENTED | The operation fails because the function is not implemented. | 684e41f4b71Sopenharmony_ci| ARKWEB_ERR_INSUFFICIENT_RESOURCES | The resources are insufficient to complete the operation. | 685e41f4b71Sopenharmony_ci| ARKWEB_ERR_OUT_OF_MEMORY | A memory overflow occurs. | 686e41f4b71Sopenharmony_ci| ARKWEB_ERR_UPLOAD_FILE_CHANGED | The file fails to be loaded because the modification time of the file is not as expected. | 687e41f4b71Sopenharmony_ci| ARKWEB_ERR_SOCKET_NOT_CONNECTED | The socket is not connected. | 688e41f4b71Sopenharmony_ci| ARKWEB_ERR_FILE_EXISTS | The file already exists. | 689e41f4b71Sopenharmony_ci| ARKWEB_ERR_FILE_PATH_TOO_LONG | The file path or file name is too long. | 690e41f4b71Sopenharmony_ci| ARKWEB_ERR_FILE_NO_SPACE | The disk space is insufficient. | 691e41f4b71Sopenharmony_ci| ARKWEB_ERR_FILE_VIRUS_INFECTED | The file is infected. | 692e41f4b71Sopenharmony_ci| ARKWEB_ERR_BLOCKED_BY_CLIENT | The request is blocked by the client. | 693e41f4b71Sopenharmony_ci| ARKWEB_ERR_NETWORK_CHANGED | The network is changed. | 694e41f4b71Sopenharmony_ci| ARKWEB_ERR_BLOCKED_BY_ADMINISTRATOR | The request is blocked by the URL blocking list configured by the domain administrator. | 695e41f4b71Sopenharmony_ci| ARKWEB_ERR_SOCKET_CONNECTED | The socket is connected. | 696e41f4b71Sopenharmony_ci| ARKWEB_ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED | The upload stream needs to be rewind due to retry or redirection. However, the uploading fails because the rewinding is not supported. | 697e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONTEXT_SHUT_DOWN | The request failed because **URLRequestContext** is shut down or being shut down. | 698e41f4b71Sopenharmony_ci| ARKWEB_ERR_BLOCKED_BY_RESPONSE | The request is blocked by response from headers such as X-Frame-Options, Content Security Policy, and Cross Origin Resource Policy. | 699e41f4b71Sopenharmony_ci| ARKWEB_ERR_CLEARTEXT_NOT_PERMITTED | The request is blocked because some or all cleartext requests are not permitted by the system policy. | 700e41f4b71Sopenharmony_ci| ARKWEB_ERR_BLOCKED_BY_CSP | The request is blocked by the Content Security Policy. | 701e41f4b71Sopenharmony_ci| ARKWEB_ERR_H2_OR_QUIC_REQUIRED | The request is blocked because there is no H/2 or QUIC session. | 702e41f4b71Sopenharmony_ci| ARKWEB_ERR_BLOCKED_BY_ORB | The request is blocked by Cross-Origin Read Blocking (CORB) or ORB. | 703e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONNECTION_CLOSED | The connection is closed, which is displayed as **TCP FIN**. | 704e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONNECTION_RESET | The connection is reset. | 705e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONNECTION_REFUSED | The connection is denied. | 706e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONNECTION_ABORTED | The connection is aborted because the ACK for sending data is not received. This may include FIN packets. | 707e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONNECTION_FAILED | The connection failed. | 708e41f4b71Sopenharmony_ci| ARKWEB_ERR_NAME_NOT_RESOLVED | The domain name cannot be resolved. | 709e41f4b71Sopenharmony_ci| ARKWEB_ERR_INTERNET_DISCONNECTED | The internet is disconnected. | 710e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_PROTOCOL_ERROR | An SSL protocol error occurs. | 711e41f4b71Sopenharmony_ci| ARKWEB_ERR_ADDRESS_INVALID | The IP address or port number is invalid (for example, IP address 0 or port 0 cannot be connected). | 712e41f4b71Sopenharmony_ci| ARKWEB_ERR_ADDRESS_UNREACHABLE | The IP address is unreachable. This means that there is no route to the specified host or network. | 713e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NEEDED | The server needs SSL client authentication certificate. | 714e41f4b71Sopenharmony_ci| ARKWEB_ERR_TUNNEL_CONNECTION_FAILED | The tunnel connection failed to be established through the proxy. | 715e41f4b71Sopenharmony_ci| ARKWEB_ERR_NO_SSL_VERSIONS_ENABLED | No SSL protocol version is enabled. | 716e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_VERSION_OR_CIPHER_MISMATCH | The client and server do not support the common SSL protocol version or cipher suite. | 717e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_RENEGOTIATION_REQUESTED | The server requests re-negotiation (re-handshake). | 718e41f4b71Sopenharmony_ci| ARKWEB_ERR_PROXY_AUTH_UNSUPPORTED | The proxy requests authentication used to establish a tunnel, but the method used is not supported. | 719e41f4b71Sopenharmony_ci| ARKWEB_ERR_BAD_SSL_CLIENT_AUTH_CERT | The SSL handshake fails because the client certificate is incorrect or missing. | 720e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONNECTION_TIMED_OUT | The connection timed out. | 721e41f4b71Sopenharmony_ci| ARKWEB_ERR_HOST_RESOLVER_QUEUE_TOO_LARGE | The number of DNS resolutions is too large, so a request in the queue is aborted. | 722e41f4b71Sopenharmony_ci| ARKWEB_ERR_SOCKS_CONNECTION_FAILED | The connection between the target host and the SOCKS proxy server failed. | 723e41f4b71Sopenharmony_ci| ARKWEB_ERR_SOCKS_CONNECTION_HOST_UNREACHABLE | The SOCKS proxy server cannot be connected to the target host because the host is unreachable. | 724e41f4b71Sopenharmony_ci| ARKWEB_ERR_ALPN_NEGOTIATION_FAILED | The request of ALPN failed. | 725e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_NO_RENEGOTIATION | The peer sent an **SSL_NO_RENEGOTIATION** alert message. | 726e41f4b71Sopenharmony_ci| ARKWEB_ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES | Winsock sometimes reports unexpected written bytes. This may be caused by LSP damage. | 727e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_DECOMPRESSION_FAILURE_ALERT | The SSL peer sent us a fatal **DECOMPRESSION_FAILURE** alert. This usually occurs when the peer falsely considers that it supports **DEFLATE** and selects it. | 728e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_BAD_RECORD_MAC_ALERT | The SSL peer sent us a fatal **BAD_RECORD_MAC** alert. This usually occurs on the server cannot support **DEFLATE** normally. | 729e41f4b71Sopenharmony_ci| ARKWEB_ERR_PROXY_AUTH_REQUESTED | The proxy requests authentication (used to establish a tunnel). | 730e41f4b71Sopenharmony_ci| ARKWEB_ERR_PROXY_CONNECTION_FAILED | The connection to the proxy server cannot be established. This is because an error occurs when the host resolves the name or connects its socket to the proxy server. Note that this does not include errors during the **HTTP CONNECT**. | 731e41f4b71Sopenharmony_ci| ARKWEB_ERR_MANDATORY_PROXY_CONFIGURATION_FAILED | The mandatory proxy configuration failed. Currently, this means that a mandatory PAC script cannot be obtained, parsed, or executed. | 732e41f4b71Sopenharmony_ci| ARKWEB_ERR_PRECONNECT_MAX_SOCKET_LIMIT | The maximum socket limit in the socket pool is reached when pre-connect. No more sockets need to be pre-connect. | 733e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED | The access to the private key of the SSL client certificate is denied. | 734e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY | The SSL client certificate does not have a private key. | 735e41f4b71Sopenharmony_ci| ARKWEB_ERR_PROXY_CERTIFICATE_INVALID | The certificate provided by the HTTPS proxy is invalid. | 736e41f4b71Sopenharmony_ci| ARKWEB_ERR_NAME_RESOLUTION_FAILED | The resolution DND failed. | 737e41f4b71Sopenharmony_ci| ARKWEB_ERR_NETWORK_ACCESS_DENIED | The access to the network is denied. This error is distinguished from errors that are likely to be caused by firewalls and other errors whose access is denied. See **ERR_ACCESS_DENIED**. | 738e41f4b71Sopenharmony_ci| ARKWEB_ERR_TEMPORARILY_THROTTLED | The request is temporarily throttled to avoid DDoS attacks. | 739e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT | The request for creating an SSL tunnel connection through the HTTPS proxy receives a 302 (temporary redirection) response. The response body may contain the description of the failure cause. | 740e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED | The CertificateVerify data of the SSL client authentication handshake cannot be signed using the private key of the client certificate. Possible reasons for this include that the user implicitly or explicitly denies access to the private key, the private key may not be available for signature, the key may rely on an invalid cache handle, or the CSP may not allow arbitrary data to be signed. | 741e41f4b71Sopenharmony_ci| ARKWEB_ERR_MSG_TOO_BIG | The message is too big to transfer. (for example, the UDP message exceeds the size limit). | 742e41f4b71Sopenharmony_ci| ARKWEB_ERR_WS_PROTOCOL_ERROR | The WebSocket protocol is incorrect. This indicates that the connection is terminating due to a frame format error or other protocol violation. | 743e41f4b71Sopenharmony_ci| ARKWEB_ERR_ADDRESS_IN_USE | The address is in use. | 744e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_HANDSHAKE_NOT_COMPLETED | The operation failed because the SSL handshake is not completed. | 745e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_BAD_PEER_PUBLIC_KEY | The public key of the SSL peer is invalid. | 746e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN | The certificate does not match the built-in public key Pins of the host name. Pin is set in **net/http/transport_security_state.cc**, and it is required that one of a set of public keys exist on the path from the leaf node to the root node. | 747e41f4b71Sopenharmony_ci| ARKWEB_ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED | The server requests the client certificate, but the request does not contain any of the certificates we support. | 748e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_DECRYPT_ERROR_ALERT | The SSL peer sent us a fatal **DECRYPT_ERROR** alert. This usually occurs when the peer cannot verify the signature (in CertificateVerify or ServerKeyExchange) or verify the **Finished** message. | 749e41f4b71Sopenharmony_ci| ARKWEB_ERR_WS_THROTTLE_QUEUE_TOO_LARGE | There are too many WebSocketJob instances to be processed. Therefore, new tasks are not pushed to the queue. | 750e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_SERVER_CERT_CHANGED | During the renegotiation, the SSL server certificate is changed. | 751e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_UNRECOGNIZED_NAME_ALERT | The SSL server sends us a fatal UNRECOGNIZED_NAME alert. | 752e41f4b71Sopenharmony_ci| ARKWEB_ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR | The receive buffer size of the socket cannot be set as requested. | 753e41f4b71Sopenharmony_ci| ARKWEB_ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR | The send buffer size of the socket cannot be set as requested. | 754e41f4b71Sopenharmony_ci| ARKWEB_ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE | The setsockopt returns a success code, but the socket's receive buffer size cannot be set to the requested value. | 755e41f4b71Sopenharmony_ci| ARKWEB_ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE | The setsockopt returns a success code, but the socket's send buffer size cannot be set to the requested value. | 756e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT | The client certificate cannot be imported into the SSL library from the platform store. | 757e41f4b71Sopenharmony_ci| ARKWEB_ERR_ICANN_NAME_COLLISION | When a host name is resolved to an IP address list, the IPv4 address 127.0.53.53 is included. This is a special IP address recommended by ICANN. It is used to indicate that there is a name conflict and remind administrators of potential problems. | 758e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_SERVER_CERT_BAD_FORMAT | The SSL server provides a certificate that cannot be decoded. This is not a certificate error code because no X509Certificate object is available. This error is fatal. | 759e41f4b71Sopenharmony_ci| ARKWEB_ERR_CT_STH_PARSING_FAILED | Certificate Transparency: The received **Signed Tree Head** cannot be parsed. | 760e41f4b71Sopenharmony_ci| ARKWEB_ERR_CT_STH_INCOMPLETE | Certificate transparency: The received **Signed Tree Head** can be successfully parsed into JSON, but some fields are missing. | 761e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH | The connection to send proxy authentication credentials cannot be reused before AuthController is start. The caller should reconnect the AuthController. This error is only used internally in the network stack. | 762e41f4b71Sopenharmony_ci| ARKWEB_ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED | Certificate transparency: The received proof of consistency cannot be parsed. | 763e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_OBSOLETE_CIPHER | The SSL server requires an obsolete cipher suite. In one or two version updates after this cipher suite is removed, as a rollback policy, this error is temporarily signaled and then the rollback policy is removed. | 764e41f4b71Sopenharmony_ci| ARKWEB_ERR_WS_UPGRADE | This error code is used to cancel the URLRequest when the WebSocket handshake is successful and the connection has been upgraded. | 765e41f4b71Sopenharmony_ci| ARKWEB_ERR_READ_IF_READY_NOT_IMPLEMENTED | The **READ_IF_READY** of the socket is not implemented. This error should not be seen by the user because the normal **Read** method will be used as an alternative. | 766e41f4b71Sopenharmony_ci| ARKWEB_ERR_NO_BUFFER_SPACE | No socket buffer space is available. | 767e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS | There is no common signing algorithm between the private key of the local end certificate and the preferences of the server. | 768e41f4b71Sopenharmony_ci| ARKWEB_ERR_EARLY_DATA_REJECTED | The server rejected **TLS 1.3 Early Data**. This error will be received before any data is returned from the socket. **Early Data** should be disabled and the request should be retried. | 769e41f4b71Sopenharmony_ci| ARKWEB_ERR_WRONG_VERSION_ON_EARLY_DATA | The server responds with TLS 1.2 or earlier when TLS 1.3 Early Data is provided. This is an internal error code to solve the backward compatibility problem between Early Data and TLS 1.2. This error code will be received before the socket returns any data. Early Data should be disabled and the request should be retried. For details, see https://tools.ietf.org/html/rfc8446\#appendix-D.3. | 770e41f4b71Sopenharmony_ci| ARKWEB_ERR_TLS13_DOWNGRADE_DETECTED | The server negotiated an earlier version when TLS 1.3 is supported. This is part of the TLS 1.3 security check, but it may also indicate that the TLS termination proxy incorrectly implements TLS 1.2. (See https://crbug.com/boringssl/226.) | 771e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_KEY_USAGE_INCOMPATIBLE | The server's certificate has a keyUsage extension that is incompatible with the negotiated TLS key exchange method. | 772e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_ECH_CONFIG_LIST | The **ECHConfigList** obtained through the DNS cannot be resolved. | 773e41f4b71Sopenharmony_ci| ARKWEB_ERR_ECH_NOT_NEGOTIATED | **Encrypted Client Hello (ECH)** is enabled, but the server cannot decrypt the encrypted **ClientHello**. | 774e41f4b71Sopenharmony_ci| ARKWEB_ERR_ECH_FALLBACK_CERTIFICATE_INVALID | **Encrypted Client Hello (ECH)** is enabled, but the server cannot decrypt the encrypted **ClientHello** and does not provide a certificate valid for the public name. | 775e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_COMMON_NAME_INVALID | The server responds with a certificate whose common name does not match the host name. The possible causes are : 1. The attacker redirects the traffic to its server and presents a certificate that they know the private key.<br>1. The server is incorrectly configured and responds with an incorrect certificate.3. The user is on the wireless network and is redirected to the login page of the network.4. The operating system uses the **DNS** search suffix, but the server does not provide a certificate for the abbreviated name in the address bar. | 776e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_DATE_INVALID | The server responds with a certificate, but according to the host clock, the certificate does not take effect or is expired. This may be one of the following: 1. The attacker provides an old certificate and obtains the private key.2. 2. The server is incorrectly configured and no valid certificate is provided.3. The host clock is wrong. | 777e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_AUTHORITY_INVALID | The server responds with a certificate signed by an authority that we do not trust. The possible causes are : 1. The attacker replaces the real certificate with a certificate that contains its public key and is signed by its associates.<br>1. The server has a valid certificate from a CA that we do not know but should trust.3. The server presents a self-signed certificate, which cannot defend against active attackers but passive attackers. | 778e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_CONTAINS_ERRORS | The certificate returned by the server contains an error. This error cannot be rectified. MSDN describes this error as "The SSL certificate contains an error". Note: It is not clear how this error differs from **ERR_CERT_INVALID**. To maintain consistency, replace this error with the **ERR_CERT_INVALID** code. | 779e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_NO_REVOCATION_MECHANISM | The certificate does not have a revocation mechanism. In other words, this certificate cannot be revoked. | 780e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_UNABLE_TO_CHECK_REVOCATION | Revocation information for this website's security certificate is not available. The possible causes are : 1. The attacker has cracked the private key in the certificate and prevented the host from finding out that the certificate is revoked.2. 2. The certificate is not revoked, but the revocation server is busy or unavailable. | 781e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_REVOKED | The certificate responded by the server is revoked. This error could but not should be ignored. | 782e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_INVALID | The server responds with an invalid certificate. This error cannot be rectified. MSDN describes this error as follows: "The SSL certificate is invalid." | 783e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_WEAK_SIGNATURE_ALGORITHM | The server responds with a certificate signed using a weak signing algorithm. | 784e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_NON_UNIQUE_NAME | The host name specified in the certificate is not unique. | 785e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_WEAK_KEY | The server responds with a certificate containing a weak key (for example, a too small RSA key). | 786e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_NAME_CONSTRAINT_VIOLATION | The **DNS** suffix declared in the certificate violates the name constraint. | 787e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_VALIDITY_TOO_LONG | The validity period of the certificate is too long. | 788e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERTIFICATE_TRANSPARENCY_REQUIRED | The **Certificate Transparency** is required, but the server does not provide CT information that complies with the policy. | 789e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_SYMANTEC_LEGACY | The certificate is linked to an old Symantec certificate or its subsidiaries that are no longer trusted. | 790e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_KNOWN_INTERCEPTION_BLOCKED | It is known that the certificate is intercepted by an entity other than the device owner. | 791e41f4b71Sopenharmony_ci| ARKWEB_ERR_SSL_OBSOLETE_VERSION_OR_CIPHER | The connection uses an obsolete version of SSL/TLS or an encryption algorithm. | 792e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_END | The error immediately follows the last certificate error code. | 793e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_URL | The URL is invalid. | 794e41f4b71Sopenharmony_ci| ARKWEB_ERR_DISALLOWED_URL_SCHEME | The scheme of the URL is not allowed. | 795e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNKNOWN_URL_SCHEME | The scheme of the URL is unknown. | 796e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_REDIRECT | An invalid URL is redirected when loads a URL. | 797e41f4b71Sopenharmony_ci| ARKWEB_ERR_TOO_MANY_REDIRECTS | Too many URLs are redirected when loads a URL. | 798e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNSAFE_REDIRECT | An insecure URL is redirected when loads a URL (for example, redirection to **file://** is insecure). | 799e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNSAFE_PORT | The port number of the URL to be loaded is unsafe. | 800e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_RESPONSE | The response from the server is invalid. | 801e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_CHUNKED_ENCODING | The chunked encoding is invalid. | 802e41f4b71Sopenharmony_ci| ARKWEB_ERR_METHOD_UNSUPPORTED | The server does not support the request method. | 803e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNEXPECTED_PROXY_AUTH | The response value is **407**, indicating proxy authentication is required, but the host does not send the request to the proxy. | 804e41f4b71Sopenharmony_ci| ARKWEB_ERR_EMPTY_RESPONSE | The server closes the connection and does not response. | 805e41f4b71Sopenharmony_ci| ARKWEB_ERR_RESPONSE_HEADERS_TOO_BIG | The response headers are too big. | 806e41f4b71Sopenharmony_ci| ARKWEB_ERR_PAC_SCRIPT_FAILED | The PAC script failed. | 807e41f4b71Sopenharmony_ci| ARKWEB_ERR_REQUEST_RANGE_NOT_SATISFIABLE | The response code is 416, indicating the server cannot meet the request range. | 808e41f4b71Sopenharmony_ci| ARKWEB_ERR_MALFORMED_IDENTITY | The identity is malformed. | 809e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONTENT_DECODING_FAILED | The content decoding of the response body failed. | 810e41f4b71Sopenharmony_ci| ARKWEB_ERR_NETWORK_IO_SUSPENDED | The operation failed because all network I/Os are suspended. | 811e41f4b71Sopenharmony_ci| ARKWEB_ERR_SYN_REPLY_NOT_RECEIVED | FLIP data is received before **SYN_REPLY** is received on the flow. | 812e41f4b71Sopenharmony_ci| ARKWEB_ERR_ENCODING_CONVERSION_FAILED | The response failed to be converted to the target encoding. | 813e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT | The server sent an unrecognized FTP directory listing format. | 814e41f4b71Sopenharmony_ci| ARKWEB_ERR_NO_SUPPORTED_PROXIES | There are no supported proxies in the list provided. | 815e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_PROTOCOL_ERROR | An HTTP/2 protocol error occurs. | 816e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_AUTH_CREDENTIALS | The HTTP authentication credentials are invalid. | 817e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNSUPPORTED_AUTH_SCHEME | The HTTP authentication scheme is not supported. | 818e41f4b71Sopenharmony_ci| ARKWEB_ERR_ENCODING_DETECTION_FAILED | The encoding detection failed. | 819e41f4b71Sopenharmony_ci| ARKWEB_ERR_MISSING_AUTH_CREDENTIALS | (GSSAPI) There Kerberos credentials of HTTP authentication are missing. | 820e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS | The SSPI or GSSAPI status code is unexpected. | 821e41f4b71Sopenharmony_ci| ARKWEB_ERR_MISCONFIGURED_AUTH_ENVIRONMENT | The authentication environment is misconfigured. (For example, the KDC cannot be found or the principal is unknown). | 822e41f4b71Sopenharmony_ci| ARKWEB_ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS | The SSPI or GSSAPI status code is undocumented. | 823e41f4b71Sopenharmony_ci| ARKWEB_ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN | The HTTP response body is too big to drain. | 824e41f4b71Sopenharmony_ci| ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH | Multiple Content-Length response headers are included in an HTTP response. | 825e41f4b71Sopenharmony_ci| ARKWEB_ERR_INCOMPLETE_HTTP2_HEADERS | The HTTP/2 response headers are incomplete. Therefore, more frames are needed to complete them. | 826e41f4b71Sopenharmony_ci| ARKWEB_ERR_PAC_NOT_IN_DHCP | The PAC URL configuration cannot be retrieved from DHCP. This may indicate that the retrieving failed, or that the PAC URL is not configured in DHCP. | 827e41f4b71Sopenharmony_ci| ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION | Multiple **Content-Disposition** headers are included in an HTTP response. | 828e41f4b71Sopenharmony_ci| ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION | Multiple **Location** headers are included in an HTTP response. | 829e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_SERVER_REFUSED_STREAM | The HTTP/2 server rejects the request without processing it and sends a **GOAWAY** frame with an error code **NO_ERROR** and a **Last-Stream-ID** lower than the **Stream ID** of the request, or the **RST_STREAM** frame with the error code **REFUSED_STREAM** indicating that the request is not processed. The client can retry the request (on a different connection). For details, see "section 8.1.4 in RFC7540". | 830e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_PING_FAILED | The HTTP/2 server does not respond to the **PING**. | 831e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONTENT_LENGTH_MISMATCH | When the connection is closed, the number of bytes transmitted in the HTTP response body is less than the number of bytes advertised in the **Content-Length** header. | 832e41f4b71Sopenharmony_ci| ARKWEB_ERR_INCOMPLETE_CHUNKED_ENCODING | The HTTP response body is transmitted using chunked encoding, and the terminated zero-length block is not sent when the connection is closed. | 833e41f4b71Sopenharmony_ci| ARKWEB_ERR_QUIC_PROTOCOL_ERROR | A QUIC protocol error occurs. | 834e41f4b71Sopenharmony_ci| ARKWEB_ERR_RESPONSE_HEADERS_TRUNCATED | The HTTP response headers are truncated by the end of file (EOF). | 835e41f4b71Sopenharmony_ci| ARKWEB_ERR_QUIC_HANDSHAKE_FAILED | The QUIC encryption handshake failed. This means that the server cannot read any requests, so they may be resent. | 836e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY | The transport security is inadequate to HTTP/2. | 837e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_FLOW_CONTROL_ERROR | The peer violates HTTP/2 flow control. | 838e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_FRAME_SIZE_ERROR | The peer sends an HTTP/2 frame of an incorrect size. | 839e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_COMPRESSION_ERROR | The decoding or encoding of the compressed HTTP/2 response headers failed. | 840e41f4b71Sopenharmony_ci| ARKWEB_ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION | The proxy authentication of a request does not have a valid client socket handle. | 841e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP_1_1_REQUIRED | The HTTP/2 session receives an **HTTP_1_1_REQUIRED** error code. | 842e41f4b71Sopenharmony_ci| ARKWEB_ERR_PROXY_HTTP_1_1_REQUIRED | The **HTTP_1_1_REQUIRED** error code is received when the HTTP/2 session proxy is used. | 843e41f4b71Sopenharmony_ci| ARKWEB_ERR_PAC_SCRIPT_TERMINATED | The PAC script has been terminated and must be reloaded. | 844e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_HTTP_RESPONSE | The server should return an **HTTP/1.x** response. But it returns an **HTTP/0.9** response. | 845e41f4b71Sopenharmony_ci| ARKWEB_ERR_CONTENT_DECODING_INIT_FAILED | The content decoding fails to be initialized. | 846e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED | An **HTTP/2 RST_STREAM** frame with **NO_ERROR** is received. This error should be handled internally by HTTP/2 and should not exceed the SpdyStream layer. | 847e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_PUSHED_STREAM_NOT_AVAILABLE | The pushed stream claimed by the request is not available. | 848e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER | The claimed pushed stream is reset by the server. In this case, the request should be retried. | 849e41f4b71Sopenharmony_ci| ARKWEB_ERR_TOO_MANY_RETRIES | There are too many retries due to invalid authentication or certificate. | 850e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_STREAM_CLOSED | An HTTP/2 frame is received on the closed stream. | 851e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_CLIENT_REFUSED_STREAM | The client refuses an HTTP/2 stream. | 852e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH | Based on the matched URL and request header, an HTTP/2 push stream is received by the request, but the pushed response header does not match the request. | 853e41f4b71Sopenharmony_ci| ARKWEB_ERR_HTTP_RESPONSE_CODE_FAILURE | The server returns a **non-2xx** HTTP response code. | 854e41f4b71Sopenharmony_ci| ARKWEB_ERR_QUIC_UNKNOWN_CERT_ROOT | The certificate displayed on the QUIC connection is not linked to a known root certificate, and the connected original server is not in the list of domain names that allow unknown root certificates. | 855e41f4b71Sopenharmony_ci| ARKWEB_ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED | A **GOAWAY** frame has been received, indicating that the request has not been processed and therefore can be safely retried on a different connection. | 856e41f4b71Sopenharmony_ci| ARKWEB_ERR_TOO_MANY_ACCEPT_CH_RESTARTS | The **ACCEPT_CH_RESTARTS** has been triggered too many times. | 857e41f4b71Sopenharmony_ci| ARKWEB_ERR_INCONSISTENT_IP_ADDRESS_SPACE | In the same request, the IP address space of the remote endpoint is different from the previous one. Cache entries for any affected requests should be marked as invalid. | 858e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_LOCAL_NETWORK_ACCESS_POLICY | The cached IP address space of the remote endpoint is blocked by a local network access policy. | 859e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_MISS | There is no entry of the request in the cache. | 860e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_READ_FAILURE | The entry cannot be read from the cache. | 861e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_WRITE_FAILURE | The entry cannot be written to the cache. | 862e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_OPERATION_UNSUPPORTED | The entry of the the request is not supported by the cache. | 863e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_OPEN_FAILURE | The cache could not open this entry. | 864e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_CREATE_FAILURE | The cache could not create this entry. | 865e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_RACE | Multiple transactions are competing to create disk cache entries. | 866e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_CHECKSUM_READ_FAILURE | The cache could not read the checksum on the entry. | 867e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_CHECKSUM_MISMATCH | An entry with an invalid checksum is found in the cache. | 868e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_LOCK_TIMEOUT | The HTTP cache contains error code. | 869e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_AUTH_FAILURE_AFTER_READ | A challenge is received after the transaction reads some data, but the credentials are unavailable. | 870e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_ENTRY_NOT_SUITABLE | This error code is for internal, non-standard HTTP caching. | 871e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_DOOM_FAILURE | The cache cannot delete this entry. | 872e41f4b71Sopenharmony_ci| ARKWEB_ERR_CACHE_OPEN_OR_CREATE_FAILURE | The cache could not open or create this entry. | 873e41f4b71Sopenharmony_ci| ARKWEB_ERR_INSECURE_RESPONSE | The server response is insecure (for example, there is a certificate error). | 874e41f4b71Sopenharmony_ci| ARKWEB_ERR_NO_PRIVATE_KEY_FOR_CERT | The client certificate failed to be imported because the user's key database does not have a private key. | 875e41f4b71Sopenharmony_ci| ARKWEB_ERR_ADD_USER_CERT_FAILED | The certificate failed to be added to the operating system database. | 876e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_SIGNED_EXCHANGE | The signed exchange is invalid. | 877e41f4b71Sopenharmony_ci| ARKWEB_ERR_INVALID_WEB_BUNDLE | The Web Bundle resources are invalid. | 878e41f4b71Sopenharmony_ci| ARKWEB_ERR_TRUST_TOKEN_OPERATION_FAILED | The request for performing the Trust Tokens protocol operation failed. The possible causes include prerequisite failure, internal error, and bad response. | 879e41f4b71Sopenharmony_ci| ARKWEB_ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST | When processing an operation execution request related to the Trust Tokens protocol, the system performs the Trust Tokens operation in the request, but does not send the request to the specified destination. | 880e41f4b71Sopenharmony_ci| ARKWEB_ERR_FTP_FAILED | The FTP control connection command failed. If possible, replace this error code with a more specific one. | 881e41f4b71Sopenharmony_ci| ARKWEB_ERR_FTP_SERVICE_UNAVAILABLE | The server cannot support the request. This is a temporary error. The FTP response code is 421. | 882e41f4b71Sopenharmony_ci| ARKWEB_ERR_FTP_TRANSFER_ABORTED | The server aborts the transfer. The FTP response code is 426. | 883e41f4b71Sopenharmony_ci| ARKWEB_ERR_FTP_FILE_BUSY | The file is in use, or some other temporary error occurs when the file is opened. The FTP response code is 450. | 884e41f4b71Sopenharmony_ci| ARKWEB_ERR_FTP_SYNTAX_ERROR | The server rejects the command from the host due to a syntax error. The FTP response code is 500 or 501. | 885e41f4b71Sopenharmony_ci| ARKWEB_ERR_FTP_COMMAND_UNSUPPORTED | The server does not support the command. The FTP response code is 502 or 504. | 886e41f4b71Sopenharmony_ci| ARKWEB_ERR_FTP_BAD_COMMAND_SEQUENCE | The server rejects the commands from the host because the host does not send the commands in the correct sequence. The FTP response code is 503. | 887e41f4b71Sopenharmony_ci| ARKWEB_ERR_PKCS12_IMPORT_BAD_PASSWORD | The **PKCS \#12** file cannot be imported because the password is incorrect. | 888e41f4b71Sopenharmony_ci| ARKWEB_ERR_PKCS12_IMPORT_FAILED | The **PKCS \#12** file cannot be imported due to other errors. | 889e41f4b71Sopenharmony_ci| ARKWEB_ERR_IMPORT_CA_CERT_NOT_CA | The CA certificate cannot be imported because it is not a real CA certificate. | 890e41f4b71Sopenharmony_ci| ARKWEB_ERR_IMPORT_CERT_ALREADY_EXISTS | The certificate cannot be imported because it already exists in the database. | 891e41f4b71Sopenharmony_ci| ARKWEB_ERR_IMPORT_CA_CERT_FAILED | The CA failed to be imported due to other errors. | 892e41f4b71Sopenharmony_ci| ARKWEB_ERR_IMPORT_SERVER_CERT_FAILED | The server certificate failed to be imported due to some internal errors. | 893e41f4b71Sopenharmony_ci| ARKWEB_ERR_PKCS12_IMPORT_INVALID_MAC | The **PKCS \#12** file failed to be imported because the message authentication code (MAC) is invalid. | 894e41f4b71Sopenharmony_ci| ARKWEB_ERR_PKCS12_IMPORT_INVALID_FILE | The **PKCS \#12** file failed to be imported because the file is invalid or corrupted. | 895e41f4b71Sopenharmony_ci| ARKWEB_ERR_PKCS12_IMPORT_UNSUPPORTED | The **PKCS \#12** file failed to be imported due to its unsupported features. | 896e41f4b71Sopenharmony_ci| ARKWEB_ERR_KEY_GENERATION_FAILED | The key generation failed. | 897e41f4b71Sopenharmony_ci| ARKWEB_ERR_PRIVATE_KEY_EXPORT_FAILED | The private key failed to be exported. | 898e41f4b71Sopenharmony_ci| ARKWEB_ERR_SELF_SIGNED_CERT_GENERATION_FAILED | The self-signed certificate failed to be generated. | 899e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_DATABASE_CHANGED | The certificate database is changed. | 900e41f4b71Sopenharmony_ci| ARKWEB_ERR_CERT_VERIFIER_CHANGED | The certificate verifier configuration is changed. | 901e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_MALFORMED_RESPONSE | The DNS resolver receives a response that the format is incorrect. | 902e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_SERVER_REQUIRES_TCP | The DNS server requires TCP. | 903e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_SERVER_FAILED | The DNS server failed. This error is returned for all of the following cases: 1 - Format error - The name server cannot interpret the query. 2-Server failure: The name server cannot process the query due to its own problems. 3-Not Implemented: The name server does not support the query type of the request. 4-Rejection: The name server refuses to perform the specified operation for policy reasons. | 904e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_TIMED_OUT | The DNS transaction timed out. | 905e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_CACHE_MISS | The entry is not found in the cache or other local sources. | 906e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_SEARCH_EMPTY | The suffix search list rule prevents the resolution of a given host name. | 907e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_SORT_ERROR | Addresses are not sorted according to RFC 3484. | 908e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED | The host name of the DNS-over-HTTPS server cannot be resolved. | 909e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_NAME_HTTPS_ONLY | DNS has identified that the request is prohibited due to insecure connections (HTTP/WS). The application should handle this error like HTTP redirection, redirecting the connection to secure HTTPS or WSS. | 910e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_REQUEST_CANCELED | All DNS requests related to this task are canceled. | 911e41f4b71Sopenharmony_ci| ARKWEB_ERR_DNS_NO_MATCHING_SUPPORTED_ALPN | The host name resolution of the HTTPS record is not resolved using the ALPN value of the supported protocol. | 912e41f4b71Sopenharmony_ci 913e41f4b71Sopenharmony_ci### ArkWeb_ResourceType 914e41f4b71Sopenharmony_ci 915e41f4b71Sopenharmony_ci``` 916e41f4b71Sopenharmony_cienum ArkWeb_ResourceType 917e41f4b71Sopenharmony_ci``` 918e41f4b71Sopenharmony_ci**Description** 919e41f4b71Sopenharmony_ci 920e41f4b71Sopenharmony_ciEnumerates the resource types. 921e41f4b71Sopenharmony_ci 922e41f4b71Sopenharmony_ciThe resource types match the corresponding items of ResourceType in Chromium and should not be renumbered. 923e41f4b71Sopenharmony_ci 924e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 925e41f4b71Sopenharmony_ci 926e41f4b71Sopenharmony_ci**Since**: 12 927e41f4b71Sopenharmony_ci 928e41f4b71Sopenharmony_ci| Value| Description| 929e41f4b71Sopenharmony_ci| -------- | -------- | 930e41f4b71Sopenharmony_ci| MAIN_FRAME | Top-level page. | 931e41f4b71Sopenharmony_ci| SUB_FRAME | Frame or Iframe. | 932e41f4b71Sopenharmony_ci| STYLE_SHEET | CSS style sheet. | 933e41f4b71Sopenharmony_ci| SCRIPT | External script. | 934e41f4b71Sopenharmony_ci| IMAGE | images (jpg/gif/png/ and others). | 935e41f4b71Sopenharmony_ci| FONT_RESOURCE | Fount resource. | 936e41f4b71Sopenharmony_ci| SUB_RESOURCE | Other sub-resources. If the type is unknown, the default type is used. | 937e41f4b71Sopenharmony_ci| OBJECT | The Object (or embedded) tag of the plug-in, or the resource requested by the plug-in. | 938e41f4b71Sopenharmony_ci| MEDIA | Media resource | 939e41f4b71Sopenharmony_ci| WORKER | Main resource of the dedicated worker thread. | 940e41f4b71Sopenharmony_ci| SHARED_WORKER | Main resource of the share worker thread. | 941e41f4b71Sopenharmony_ci| PREFETCH | Explicit prefetch request. | 942e41f4b71Sopenharmony_ci| FAVICON | Website icon. | 943e41f4b71Sopenharmony_ci| XHR | XMLHttpRequest. | 944e41f4b71Sopenharmony_ci| PING | Ping request of **/sendBeacon**. | 945e41f4b71Sopenharmony_ci| SERVICE_WORKER | Main resource of the service worker. | 946e41f4b71Sopenharmony_ci| CSP_REPORT | Report of Content Security Policy violation. | 947e41f4b71Sopenharmony_ci| PLUGIN_RESOURCE | Resource requested by the plug-in. | 948e41f4b71Sopenharmony_ci| NAVIGATION_PRELOAD_MAIN_FRAME | Main frame redirection request that triggers service worker warm-up. | 949e41f4b71Sopenharmony_ci| NAVIGATION_PRELOAD_SUB_FRAME | Subframe redirection request that triggers service worker warm-up. | 950e41f4b71Sopenharmony_ci 951e41f4b71Sopenharmony_ci 952e41f4b71Sopenharmony_ci### ArkWeb_WebMessageType 953e41f4b71Sopenharmony_ci 954e41f4b71Sopenharmony_ci``` 955e41f4b71Sopenharmony_cienum ArkWeb_WebMessageType 956e41f4b71Sopenharmony_ci``` 957e41f4b71Sopenharmony_ci**Description** 958e41f4b71Sopenharmony_ci 959e41f4b71Sopenharmony_ciEnumerates the data types of post message. 960e41f4b71Sopenharmony_ci 961e41f4b71Sopenharmony_ci**Since**: 12 962e41f4b71Sopenharmony_ci 963e41f4b71Sopenharmony_ci| Value| Description| 964e41f4b71Sopenharmony_ci| -------- | -------- | 965e41f4b71Sopenharmony_ci| ARKWEB_NONE | Incorrect data. | 966e41f4b71Sopenharmony_ci| ARKWEB_STRING | String data. | 967e41f4b71Sopenharmony_ci| ARKWEB_BUFFER | Byte stream data. | 968e41f4b71Sopenharmony_ci 969e41f4b71Sopenharmony_ci 970e41f4b71Sopenharmony_ci## Function Description 971e41f4b71Sopenharmony_ci 972e41f4b71Sopenharmony_ci 973e41f4b71Sopenharmony_ci### OH_ArkWeb_ClearSchemeHandlers() 974e41f4b71Sopenharmony_ci 975e41f4b71Sopenharmony_ci``` 976e41f4b71Sopenharmony_ciint32_t OH_ArkWeb_ClearSchemeHandlers (const char * webTag) 977e41f4b71Sopenharmony_ci``` 978e41f4b71Sopenharmony_ci**Description** 979e41f4b71Sopenharmony_ci 980e41f4b71Sopenharmony_ciClears the **SchemeHandler** registered for the specified web. 981e41f4b71Sopenharmony_ci 982e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 983e41f4b71Sopenharmony_ci 984e41f4b71Sopenharmony_ci**Since**: 12 985e41f4b71Sopenharmony_ci 986e41f4b71Sopenharmony_ci**Parameters** 987e41f4b71Sopenharmony_ci 988e41f4b71Sopenharmony_ci| Name| Description| 989e41f4b71Sopenharmony_ci| -------- | -------- | 990e41f4b71Sopenharmony_ci| webTag | Tag that uniquely identifies a **\<Web>** component. Ensure that it is unique. | 991e41f4b71Sopenharmony_ci 992e41f4b71Sopenharmony_ci**Returns** 993e41f4b71Sopenharmony_ci 994e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 995e41f4b71Sopenharmony_ci 996e41f4b71Sopenharmony_ci 997e41f4b71Sopenharmony_ci### OH_ArkWeb_CreateResponse() 998e41f4b71Sopenharmony_ci 999e41f4b71Sopenharmony_ci``` 1000e41f4b71Sopenharmony_civoid OH_ArkWeb_CreateResponse (ArkWeb_Response ** response) 1001e41f4b71Sopenharmony_ci``` 1002e41f4b71Sopenharmony_ci**Description** 1003e41f4b71Sopenharmony_ci 1004e41f4b71Sopenharmony_ciCreates an **ArkWeb_Response** object for the intercepted request. 1005e41f4b71Sopenharmony_ci 1006e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1007e41f4b71Sopenharmony_ci 1008e41f4b71Sopenharmony_ci**Since**: 12 1009e41f4b71Sopenharmony_ci 1010e41f4b71Sopenharmony_ci**Parameters** 1011e41f4b71Sopenharmony_ci 1012e41f4b71Sopenharmony_ci| Name| Description| 1013e41f4b71Sopenharmony_ci| -------- | -------- | 1014e41f4b71Sopenharmony_ci| response | Returns the created **ArkWeb_Response**. Use **OH_ArkWeb_DestoryResponse** to destroy it when it is not required.| 1015e41f4b71Sopenharmony_ci 1016e41f4b71Sopenharmony_ci 1017e41f4b71Sopenharmony_ci### OH_ArkWeb_CreateSchemeHandler() 1018e41f4b71Sopenharmony_ci 1019e41f4b71Sopenharmony_ci``` 1020e41f4b71Sopenharmony_civoid OH_ArkWeb_CreateSchemeHandler (ArkWeb_SchemeHandler ** schemeHandler) 1021e41f4b71Sopenharmony_ci``` 1022e41f4b71Sopenharmony_ci**Description** 1023e41f4b71Sopenharmony_ci 1024e41f4b71Sopenharmony_ciCreates an **ArkWeb_SchemeHandler** object. 1025e41f4b71Sopenharmony_ci 1026e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1027e41f4b71Sopenharmony_ci 1028e41f4b71Sopenharmony_ci**Since**: 12 1029e41f4b71Sopenharmony_ci 1030e41f4b71Sopenharmony_ci**Parameters** 1031e41f4b71Sopenharmony_ci 1032e41f4b71Sopenharmony_ci| Name| Description| 1033e41f4b71Sopenharmony_ci| -------- | -------- | 1034e41f4b71Sopenharmony_ci| schemeHandler | Returns the created **ArkWeb_SchemeHandler**. You can use **OH_ArkWeb_DestoryschemeHandler** to destroy it when it is not needed.| 1035e41f4b71Sopenharmony_ci 1036e41f4b71Sopenharmony_ci 1037e41f4b71Sopenharmony_ci### OH_ArkWeb_DestroyResponse() 1038e41f4b71Sopenharmony_ci 1039e41f4b71Sopenharmony_ci``` 1040e41f4b71Sopenharmony_civoid OH_ArkWeb_DestroyResponse (ArkWeb_Response * response) 1041e41f4b71Sopenharmony_ci``` 1042e41f4b71Sopenharmony_ci**Description** 1043e41f4b71Sopenharmony_ci 1044e41f4b71Sopenharmony_ciDestroys an **ArkWeb_Response** object. 1045e41f4b71Sopenharmony_ci 1046e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1047e41f4b71Sopenharmony_ci 1048e41f4b71Sopenharmony_ci**Since**: 12 1049e41f4b71Sopenharmony_ci 1050e41f4b71Sopenharmony_ci**Parameters** 1051e41f4b71Sopenharmony_ci 1052e41f4b71Sopenharmony_ci| Name| Description| 1053e41f4b71Sopenharmony_ci| -------- | -------- | 1054e41f4b71Sopenharmony_ci| response | The **ArkWeb_Response** to be destroyed.| 1055e41f4b71Sopenharmony_ci 1056e41f4b71Sopenharmony_ci 1057e41f4b71Sopenharmony_ci### OH_ArkWeb_DestroySchemeHandler() 1058e41f4b71Sopenharmony_ci 1059e41f4b71Sopenharmony_ci``` 1060e41f4b71Sopenharmony_civoid OH_ArkWeb_DestroySchemeHandler (ArkWeb_SchemeHandler * schemeHandler) 1061e41f4b71Sopenharmony_ci``` 1062e41f4b71Sopenharmony_ci**Description** 1063e41f4b71Sopenharmony_ci 1064e41f4b71Sopenharmony_ciDestroys an **ArkWeb_SchemeHandler** object. 1065e41f4b71Sopenharmony_ci 1066e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1067e41f4b71Sopenharmony_ci 1068e41f4b71Sopenharmony_ci**Since**: 12 1069e41f4b71Sopenharmony_ci 1070e41f4b71Sopenharmony_ci**Parameters** 1071e41f4b71Sopenharmony_ci 1072e41f4b71Sopenharmony_ci| Name| Description| 1073e41f4b71Sopenharmony_ci| -------- | -------- | 1074e41f4b71Sopenharmony_ci| schemeHandler | The **ArkWeb_SchemeHandler** to be destroyed.| 1075e41f4b71Sopenharmony_ci 1076e41f4b71Sopenharmony_ci 1077e41f4b71Sopenharmony_ci### OH_ArkWeb_GetNativeAPI() 1078e41f4b71Sopenharmony_ci 1079e41f4b71Sopenharmony_ci``` 1080e41f4b71Sopenharmony_ciArkWeb_AnyNativeAPI* OH_ArkWeb_GetNativeAPI (ArkWeb_NativeAPIVariantKind type) 1081e41f4b71Sopenharmony_ci``` 1082e41f4b71Sopenharmony_ci**Description** 1083e41f4b71Sopenharmony_ci 1084e41f4b71Sopenharmony_ciObtains the native API struct based on the transferred API type. 1085e41f4b71Sopenharmony_ci 1086e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1087e41f4b71Sopenharmony_ci 1088e41f4b71Sopenharmony_ci**Since**: 12 1089e41f4b71Sopenharmony_ci 1090e41f4b71Sopenharmony_ci**Parameters** 1091e41f4b71Sopenharmony_ci 1092e41f4b71Sopenharmony_ci| Name| Description| 1093e41f4b71Sopenharmony_ci| -------- | -------- | 1094e41f4b71Sopenharmony_ci| type | The native API types supported by ArkWeb. | 1095e41f4b71Sopenharmony_ci 1096e41f4b71Sopenharmony_ci**Returns** 1097e41f4b71Sopenharmony_ci 1098e41f4b71Sopenharmony_ciThe corresponding native API structure pointer is returned based on the input API type. The first member of the structure is the size of the current structure. 1099e41f4b71Sopenharmony_ci 1100e41f4b71Sopenharmony_ci 1101e41f4b71Sopenharmony_ci### OH_ArkWeb_RegisterCustomSchemes() 1102e41f4b71Sopenharmony_ci 1103e41f4b71Sopenharmony_ci``` 1104e41f4b71Sopenharmony_ciint32_t OH_ArkWeb_RegisterCustomSchemes (const char * scheme, int32_t option ) 1105e41f4b71Sopenharmony_ci``` 1106e41f4b71Sopenharmony_ci**Description** 1107e41f4b71Sopenharmony_ci 1108e41f4b71Sopenharmony_ciRegisters a custom scheme with the **ArkWeb**. 1109e41f4b71Sopenharmony_ci 1110e41f4b71Sopenharmony_ciThis function should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT, and DATA protocols. 1111e41f4b71Sopenharmony_ci 1112e41f4b71Sopenharmony_ciThis function should be called on the main thread and before kernel initialization. 1113e41f4b71Sopenharmony_ci 1114e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1115e41f4b71Sopenharmony_ci 1116e41f4b71Sopenharmony_ci**Since**: 12 1117e41f4b71Sopenharmony_ci 1118e41f4b71Sopenharmony_ci**Parameters** 1119e41f4b71Sopenharmony_ci 1120e41f4b71Sopenharmony_ci| Name| Description| 1121e41f4b71Sopenharmony_ci| -------- | -------- | 1122e41f4b71Sopenharmony_ci| scheme | Scheme to be registered. | 1123e41f4b71Sopenharmony_ci| option | Scheme options. | 1124e41f4b71Sopenharmony_ci 1125e41f4b71Sopenharmony_ci**Returns** 1126e41f4b71Sopenharmony_ci 1127e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100100** is returned, an unknown error occurs. If **17100101** is returned, the parameter is invalid. If **17100102** is returned, the configuration of the scheme fails to be registered. The scheme should be registered before the ArkWeb is created. 1128e41f4b71Sopenharmony_ci 1129e41f4b71Sopenharmony_ci 1130e41f4b71Sopenharmony_ci### OH_ArkWeb_ReleaseByteArray() 1131e41f4b71Sopenharmony_ci 1132e41f4b71Sopenharmony_ci``` 1133e41f4b71Sopenharmony_civoid OH_ArkWeb_ReleaseByteArray (uint8_t * byteArray) 1134e41f4b71Sopenharmony_ci``` 1135e41f4b71Sopenharmony_ci**Description** 1136e41f4b71Sopenharmony_ci 1137e41f4b71Sopenharmony_ciReleases the byte array created by NDK APIs. 1138e41f4b71Sopenharmony_ci 1139e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1140e41f4b71Sopenharmony_ci 1141e41f4b71Sopenharmony_ci**Since**: 12 1142e41f4b71Sopenharmony_ci 1143e41f4b71Sopenharmony_ci**Parameters** 1144e41f4b71Sopenharmony_ci 1145e41f4b71Sopenharmony_ci| Name| Description| 1146e41f4b71Sopenharmony_ci| -------- | -------- | 1147e41f4b71Sopenharmony_ci| byteArray | Byte array to be released.| 1148e41f4b71Sopenharmony_ci 1149e41f4b71Sopenharmony_ci 1150e41f4b71Sopenharmony_ci### OH_ArkWeb_ReleaseString() 1151e41f4b71Sopenharmony_ci 1152e41f4b71Sopenharmony_ci``` 1153e41f4b71Sopenharmony_civoid OH_ArkWeb_ReleaseString (char * string) 1154e41f4b71Sopenharmony_ci``` 1155e41f4b71Sopenharmony_ci**Description** 1156e41f4b71Sopenharmony_ci 1157e41f4b71Sopenharmony_ciReleases the string created by NDK APIs. 1158e41f4b71Sopenharmony_ci 1159e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1160e41f4b71Sopenharmony_ci 1161e41f4b71Sopenharmony_ci**Since**: 12 1162e41f4b71Sopenharmony_ci 1163e41f4b71Sopenharmony_ci**Parameters** 1164e41f4b71Sopenharmony_ci 1165e41f4b71Sopenharmony_ci| Name| Description| 1166e41f4b71Sopenharmony_ci| -------- | -------- | 1167e41f4b71Sopenharmony_ci| string | Character string to be released.| 1168e41f4b71Sopenharmony_ci 1169e41f4b71Sopenharmony_ci 1170e41f4b71Sopenharmony_ci### OH_ArkWeb_SetSchemeHandler() 1171e41f4b71Sopenharmony_ci 1172e41f4b71Sopenharmony_ci``` 1173e41f4b71Sopenharmony_cibool OH_ArkWeb_SetSchemeHandler (const char * scheme, const char * webTag, ArkWeb_SchemeHandler * schemeHandler ) 1174e41f4b71Sopenharmony_ci``` 1175e41f4b71Sopenharmony_ci**Description** 1176e41f4b71Sopenharmony_ci 1177e41f4b71Sopenharmony_ciSets an **ArkWeb_SchemeHandler** for a specified scheme to intercept requests of this scheme. 1178e41f4b71Sopenharmony_ci 1179e41f4b71Sopenharmony_ciThe **SchemeHandler** should be set after **BrowserContext** is created. 1180e41f4b71Sopenharmony_ci 1181e41f4b71Sopenharmony_ciYou can use **WebviewController.initializeWebEngine** to initialize **BrowserContext** without creating the ArkWeb component. 1182e41f4b71Sopenharmony_ci 1183e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1184e41f4b71Sopenharmony_ci 1185e41f4b71Sopenharmony_ci**Since**: 12 1186e41f4b71Sopenharmony_ci 1187e41f4b71Sopenharmony_ci**Parameters** 1188e41f4b71Sopenharmony_ci 1189e41f4b71Sopenharmony_ci| Name| Description| 1190e41f4b71Sopenharmony_ci| -------- | -------- | 1191e41f4b71Sopenharmony_ci| scheme | The scheme to be intercepted. | 1192e41f4b71Sopenharmony_ci| webTag | Tag that uniquely identifies a **\<Web>** component. Ensure that it is unique. | 1193e41f4b71Sopenharmony_ci| schemeHandler | The **ArkWeb_SchemeHandler** for this scheme. Only requests triggered from the specified web are notified through this **SchemeHandler**. | 1194e41f4b71Sopenharmony_ci 1195e41f4b71Sopenharmony_ci**Returns** 1196e41f4b71Sopenharmony_ci 1197e41f4b71Sopenharmony_ciIf the **SchemeHandler** is successfully set for the specified scheme, **true** is returned. Otherwise, **false** is returned. 1198e41f4b71Sopenharmony_ci 1199e41f4b71Sopenharmony_ci 1200e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_GetPosition() 1201e41f4b71Sopenharmony_ci 1202e41f4b71Sopenharmony_ci``` 1203e41f4b71Sopenharmony_ciuint64_t OH_ArkWebHttpBodyStream_GetPosition (const ArkWeb_HttpBodyStream * httpBodyStream) 1204e41f4b71Sopenharmony_ci``` 1205e41f4b71Sopenharmony_ci**Description** 1206e41f4b71Sopenharmony_ci 1207e41f4b71Sopenharmony_ciObtains the position of **httpBodyStream**. 1208e41f4b71Sopenharmony_ci 1209e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1210e41f4b71Sopenharmony_ci 1211e41f4b71Sopenharmony_ci**Since**: 12 1212e41f4b71Sopenharmony_ci 1213e41f4b71Sopenharmony_ci**Parameters** 1214e41f4b71Sopenharmony_ci 1215e41f4b71Sopenharmony_ci| Name| Description| 1216e41f4b71Sopenharmony_ci| -------- | -------- | 1217e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1218e41f4b71Sopenharmony_ci 1219e41f4b71Sopenharmony_ci**Returns** 1220e41f4b71Sopenharmony_ci 1221e41f4b71Sopenharmony_ciThe position of **httpBodyStream**. If **httpBodyStream** is invalid, the position value is **0**. 1222e41f4b71Sopenharmony_ci 1223e41f4b71Sopenharmony_ci 1224e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_GetSize() 1225e41f4b71Sopenharmony_ci 1226e41f4b71Sopenharmony_ci``` 1227e41f4b71Sopenharmony_ciuint64_t OH_ArkWebHttpBodyStream_GetSize (const ArkWeb_HttpBodyStream * httpBodyStream) 1228e41f4b71Sopenharmony_ci``` 1229e41f4b71Sopenharmony_ci**Description** 1230e41f4b71Sopenharmony_ci 1231e41f4b71Sopenharmony_ciObtains the size of **httpBodyStream**. 1232e41f4b71Sopenharmony_ci 1233e41f4b71Sopenharmony_ciWhen data is transmitted in blocks or **httpBodyStream** is invalid, **0** is always returned. 1234e41f4b71Sopenharmony_ci 1235e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1236e41f4b71Sopenharmony_ci 1237e41f4b71Sopenharmony_ci**Since**: 12 1238e41f4b71Sopenharmony_ci 1239e41f4b71Sopenharmony_ci**Parameters** 1240e41f4b71Sopenharmony_ci 1241e41f4b71Sopenharmony_ci| Name| Description| 1242e41f4b71Sopenharmony_ci| -------- | -------- | 1243e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1244e41f4b71Sopenharmony_ci 1245e41f4b71Sopenharmony_ci**Returns** 1246e41f4b71Sopenharmony_ci 1247e41f4b71Sopenharmony_ciThe size of **httpBodyStream**. 1248e41f4b71Sopenharmony_ci 1249e41f4b71Sopenharmony_ci 1250e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_GetUserData() 1251e41f4b71Sopenharmony_ci 1252e41f4b71Sopenharmony_ci``` 1253e41f4b71Sopenharmony_civoid* OH_ArkWebHttpBodyStream_GetUserData (const ArkWeb_HttpBodyStream * httpBodyStream) 1254e41f4b71Sopenharmony_ci``` 1255e41f4b71Sopenharmony_ci**Description** 1256e41f4b71Sopenharmony_ci 1257e41f4b71Sopenharmony_ciObtains user data from **ArkWeb_HttpBodyStream**. 1258e41f4b71Sopenharmony_ci 1259e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1260e41f4b71Sopenharmony_ci 1261e41f4b71Sopenharmony_ci**Since**: 12 1262e41f4b71Sopenharmony_ci 1263e41f4b71Sopenharmony_ci**Parameters** 1264e41f4b71Sopenharmony_ci 1265e41f4b71Sopenharmony_ci| Name| Description| 1266e41f4b71Sopenharmony_ci| -------- | -------- | 1267e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1268e41f4b71Sopenharmony_ci 1269e41f4b71Sopenharmony_ci**Returns** 1270e41f4b71Sopenharmony_ci 1271e41f4b71Sopenharmony_ciReturns the user data. 1272e41f4b71Sopenharmony_ci 1273e41f4b71Sopenharmony_ci 1274e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_Init() 1275e41f4b71Sopenharmony_ci 1276e41f4b71Sopenharmony_ci``` 1277e41f4b71Sopenharmony_ciint32_t OH_ArkWebHttpBodyStream_Init (ArkWeb_HttpBodyStream * httpBodyStream, ArkWeb_HttpBodyStreamInitCallback initCallback ) 1278e41f4b71Sopenharmony_ci``` 1279e41f4b71Sopenharmony_ci**Description** 1280e41f4b71Sopenharmony_ci 1281e41f4b71Sopenharmony_ciInitializes **ArkWeb_HttpBodyStream**. 1282e41f4b71Sopenharmony_ci 1283e41f4b71Sopenharmony_ciThis function must be called before any other function is called. This API needs to be called in the I/O thread. 1284e41f4b71Sopenharmony_ci 1285e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1286e41f4b71Sopenharmony_ci 1287e41f4b71Sopenharmony_ci**Since**: 12 1288e41f4b71Sopenharmony_ci 1289e41f4b71Sopenharmony_ci**Parameters** 1290e41f4b71Sopenharmony_ci 1291e41f4b71Sopenharmony_ci| Name| Description| 1292e41f4b71Sopenharmony_ci| -------- | -------- | 1293e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1294e41f4b71Sopenharmony_ci| initCallback | Callback used to initialize. | 1295e41f4b71Sopenharmony_ci 1296e41f4b71Sopenharmony_ci**Returns** 1297e41f4b71Sopenharmony_ci 1298e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1299e41f4b71Sopenharmony_ci 1300e41f4b71Sopenharmony_ci 1301e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_IsChunked() 1302e41f4b71Sopenharmony_ci 1303e41f4b71Sopenharmony_ci``` 1304e41f4b71Sopenharmony_cibool OH_ArkWebHttpBodyStream_IsChunked (const ArkWeb_HttpBodyStream * httpBodyStream) 1305e41f4b71Sopenharmony_ci``` 1306e41f4b71Sopenharmony_ci**Description** 1307e41f4b71Sopenharmony_ci 1308e41f4b71Sopenharmony_ciDetermines whether **httpBodyStream** is chunked to transfer. 1309e41f4b71Sopenharmony_ci 1310e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1311e41f4b71Sopenharmony_ci 1312e41f4b71Sopenharmony_ci**Since**: 12 1313e41f4b71Sopenharmony_ci 1314e41f4b71Sopenharmony_ci**Parameters** 1315e41f4b71Sopenharmony_ci 1316e41f4b71Sopenharmony_ci| Name| Description| 1317e41f4b71Sopenharmony_ci| -------- | -------- | 1318e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1319e41f4b71Sopenharmony_ci 1320e41f4b71Sopenharmony_ci**Returns** 1321e41f4b71Sopenharmony_ci 1322e41f4b71Sopenharmony_ciIf **httpBodyStream** is chunked to transfer, **true** is returned. Otherwise, **false** is returned. 1323e41f4b71Sopenharmony_ci 1324e41f4b71Sopenharmony_ci 1325e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_IsEof() 1326e41f4b71Sopenharmony_ci 1327e41f4b71Sopenharmony_ci``` 1328e41f4b71Sopenharmony_cibool OH_ArkWebHttpBodyStream_IsEof (const ArkWeb_HttpBodyStream * httpBodyStream) 1329e41f4b71Sopenharmony_ci``` 1330e41f4b71Sopenharmony_ci**Description** 1331e41f4b71Sopenharmony_ci 1332e41f4b71Sopenharmony_ciReturns **true** if all data in **httpBodyStream** is read. 1333e41f4b71Sopenharmony_ci 1334e41f4b71Sopenharmony_ciReturns **false** before read the chunked **httpBodyStream** the first time. 1335e41f4b71Sopenharmony_ci 1336e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1337e41f4b71Sopenharmony_ci 1338e41f4b71Sopenharmony_ci**Since**: 12 1339e41f4b71Sopenharmony_ci 1340e41f4b71Sopenharmony_ci**Parameters** 1341e41f4b71Sopenharmony_ci 1342e41f4b71Sopenharmony_ci| Name| Description| 1343e41f4b71Sopenharmony_ci| -------- | -------- | 1344e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1345e41f4b71Sopenharmony_ci 1346e41f4b71Sopenharmony_ci**Returns** 1347e41f4b71Sopenharmony_ci 1348e41f4b71Sopenharmony_ciIf all data has been read, **true** is returned. Otherwise, **false** is returned. 1349e41f4b71Sopenharmony_ci 1350e41f4b71Sopenharmony_ci 1351e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_IsInMemory() 1352e41f4b71Sopenharmony_ci 1353e41f4b71Sopenharmony_ci``` 1354e41f4b71Sopenharmony_cibool OH_ArkWebHttpBodyStream_IsInMemory (const ArkWeb_HttpBodyStream * httpBodyStream) 1355e41f4b71Sopenharmony_ci``` 1356e41f4b71Sopenharmony_ci**Description** 1357e41f4b71Sopenharmony_ci 1358e41f4b71Sopenharmony_ciReturns **true** if all the upload data in **httpBodyStream** is in memory and all read requests will be synchronized successfully. 1359e41f4b71Sopenharmony_ci 1360e41f4b71Sopenharmony_ciReturns **false** if the data is chunked to transfer. 1361e41f4b71Sopenharmony_ci 1362e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1363e41f4b71Sopenharmony_ci 1364e41f4b71Sopenharmony_ci**Since**: 12 1365e41f4b71Sopenharmony_ci 1366e41f4b71Sopenharmony_ci**Parameters** 1367e41f4b71Sopenharmony_ci 1368e41f4b71Sopenharmony_ci| Name| Description| 1369e41f4b71Sopenharmony_ci| -------- | -------- | 1370e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1371e41f4b71Sopenharmony_ci 1372e41f4b71Sopenharmony_ci**Returns** 1373e41f4b71Sopenharmony_ci 1374e41f4b71Sopenharmony_ciIf all the uploaded data is stored in the memory, **true** is returned. Otherwise, **false** is returned. 1375e41f4b71Sopenharmony_ci 1376e41f4b71Sopenharmony_ci 1377e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_Read() 1378e41f4b71Sopenharmony_ci 1379e41f4b71Sopenharmony_ci``` 1380e41f4b71Sopenharmony_civoid OH_ArkWebHttpBodyStream_Read (const ArkWeb_HttpBodyStream * httpBodyStream, uint8_t * buffer, int bufLen ) 1381e41f4b71Sopenharmony_ci``` 1382e41f4b71Sopenharmony_ci**Description** 1383e41f4b71Sopenharmony_ci 1384e41f4b71Sopenharmony_ciExports upload data of the request to the buffer. 1385e41f4b71Sopenharmony_ci 1386e41f4b71Sopenharmony_ciThe buffer size must be greater than the value of **bufLen**. The data from the worker thread is exported to the buffer. Therefore, before the callback returns, the buffer should not be used in other threads to avoid concurrency problems. 1387e41f4b71Sopenharmony_ci 1388e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1389e41f4b71Sopenharmony_ci 1390e41f4b71Sopenharmony_ci**Since**: 12 1391e41f4b71Sopenharmony_ci 1392e41f4b71Sopenharmony_ci**Parameters** 1393e41f4b71Sopenharmony_ci 1394e41f4b71Sopenharmony_ci| Name| Description| 1395e41f4b71Sopenharmony_ci| -------- | -------- | 1396e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1397e41f4b71Sopenharmony_ci| buffer | Buffer for receiving data. | 1398e41f4b71Sopenharmony_ci| bufLen | Size of the byte to be read.| 1399e41f4b71Sopenharmony_ci 1400e41f4b71Sopenharmony_ci 1401e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_SetReadCallback() 1402e41f4b71Sopenharmony_ci 1403e41f4b71Sopenharmony_ci``` 1404e41f4b71Sopenharmony_ciint32_t OH_ArkWebHttpBodyStream_SetReadCallback (ArkWeb_HttpBodyStream * httpBodyStream, ArkWeb_HttpBodyStreamReadCallback readCallback ) 1405e41f4b71Sopenharmony_ci``` 1406e41f4b71Sopenharmony_ci**Description** 1407e41f4b71Sopenharmony_ci 1408e41f4b71Sopenharmony_ciSets a callback for **OH_ArkWebHttpBodyStream_Read**. 1409e41f4b71Sopenharmony_ci 1410e41f4b71Sopenharmony_ciThe result of **OH_ArkWebHttpBodyStream_Read** is notified to the caller through **readCallback**. 1411e41f4b71Sopenharmony_ci 1412e41f4b71Sopenharmony_ciThis callback will run in the same thread as **OH_ArkWebHttpBodyStream_Read**. 1413e41f4b71Sopenharmony_ci 1414e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1415e41f4b71Sopenharmony_ci 1416e41f4b71Sopenharmony_ci**Since**: 12 1417e41f4b71Sopenharmony_ci 1418e41f4b71Sopenharmony_ci**Parameters** 1419e41f4b71Sopenharmony_ci 1420e41f4b71Sopenharmony_ci| Name| Description| 1421e41f4b71Sopenharmony_ci| -------- | -------- | 1422e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1423e41f4b71Sopenharmony_ci| readCallback | Callback of **OH_ArkWebHttpBodyStream_Read**. | 1424e41f4b71Sopenharmony_ci 1425e41f4b71Sopenharmony_ci**Returns** 1426e41f4b71Sopenharmony_ci 1427e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1428e41f4b71Sopenharmony_ci 1429e41f4b71Sopenharmony_ci 1430e41f4b71Sopenharmony_ci### OH_ArkWebHttpBodyStream_SetUserData() 1431e41f4b71Sopenharmony_ci 1432e41f4b71Sopenharmony_ci``` 1433e41f4b71Sopenharmony_ciint32_t OH_ArkWebHttpBodyStream_SetUserData (ArkWeb_HttpBodyStream * httpBodyStream, void * userData ) 1434e41f4b71Sopenharmony_ci``` 1435e41f4b71Sopenharmony_ci**Description** 1436e41f4b71Sopenharmony_ci 1437e41f4b71Sopenharmony_ciSets user data to the **ArkWeb_HttpBodyStream** object. 1438e41f4b71Sopenharmony_ci 1439e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1440e41f4b71Sopenharmony_ci 1441e41f4b71Sopenharmony_ci**Since**: 12 1442e41f4b71Sopenharmony_ci 1443e41f4b71Sopenharmony_ci**Parameters** 1444e41f4b71Sopenharmony_ci 1445e41f4b71Sopenharmony_ci| Name| Description| 1446e41f4b71Sopenharmony_ci| -------- | -------- | 1447e41f4b71Sopenharmony_ci| httpBodyStream | ArkWeb_HttpBodyStream. | 1448e41f4b71Sopenharmony_ci| userData | The user data to be set. | 1449e41f4b71Sopenharmony_ci 1450e41f4b71Sopenharmony_ci**Returns** 1451e41f4b71Sopenharmony_ci 1452e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1453e41f4b71Sopenharmony_ci 1454e41f4b71Sopenharmony_ci 1455e41f4b71Sopenharmony_ci### OH_ArkWebRequestHeaderList_Destroy() 1456e41f4b71Sopenharmony_ci 1457e41f4b71Sopenharmony_ci``` 1458e41f4b71Sopenharmony_civoid OH_ArkWebRequestHeaderList_Destroy (ArkWeb_RequestHeaderList * requestHeaderList) 1459e41f4b71Sopenharmony_ci``` 1460e41f4b71Sopenharmony_ci**Description** 1461e41f4b71Sopenharmony_ci 1462e41f4b71Sopenharmony_ciDestroys an **ArkWeb_RequestHeaderList** object. 1463e41f4b71Sopenharmony_ci 1464e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1465e41f4b71Sopenharmony_ci 1466e41f4b71Sopenharmony_ci**Since**: 12 1467e41f4b71Sopenharmony_ci 1468e41f4b71Sopenharmony_ci**Parameters** 1469e41f4b71Sopenharmony_ci 1470e41f4b71Sopenharmony_ci| Name| Description| 1471e41f4b71Sopenharmony_ci| -------- | -------- | 1472e41f4b71Sopenharmony_ci| requestHeaderList | The **ArkWeb_RequestHeaderList** to be destroyed.| 1473e41f4b71Sopenharmony_ci 1474e41f4b71Sopenharmony_ci 1475e41f4b71Sopenharmony_ci### OH_ArkWebRequestHeaderList_GetHeader() 1476e41f4b71Sopenharmony_ci 1477e41f4b71Sopenharmony_ci``` 1478e41f4b71Sopenharmony_civoid OH_ArkWebRequestHeaderList_GetHeader (const ArkWeb_RequestHeaderList * requestHeaderList, int32_t index, char ** key, char ** value ) 1479e41f4b71Sopenharmony_ci``` 1480e41f4b71Sopenharmony_ci**Description** 1481e41f4b71Sopenharmony_ci 1482e41f4b71Sopenharmony_ciObtains a specified request header. 1483e41f4b71Sopenharmony_ci 1484e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1485e41f4b71Sopenharmony_ci 1486e41f4b71Sopenharmony_ci**Since**: 12 1487e41f4b71Sopenharmony_ci 1488e41f4b71Sopenharmony_ci**Parameters** 1489e41f4b71Sopenharmony_ci 1490e41f4b71Sopenharmony_ci| Name| Description| 1491e41f4b71Sopenharmony_ci| -------- | -------- | 1492e41f4b71Sopenharmony_ci| requestHeaderList | The request header list. | 1493e41f4b71Sopenharmony_ci| index | The index of the request headers. | 1494e41f4b71Sopenharmony_ci| key | The key of a request header. You should use the **OH_ArkWeb_ReleaseString** function to release the string. | 1495e41f4b71Sopenharmony_ci| value | The value of a request header. You should use the **OH_ArkWeb_ReleaseString** function to release the string.| 1496e41f4b71Sopenharmony_ci 1497e41f4b71Sopenharmony_ci 1498e41f4b71Sopenharmony_ci### OH_ArkWebRequestHeaderList_GetSize() 1499e41f4b71Sopenharmony_ci 1500e41f4b71Sopenharmony_ci``` 1501e41f4b71Sopenharmony_ciint32_t OH_ArkWebRequestHeaderList_GetSize (const ArkWeb_RequestHeaderList * requestHeaderList) 1502e41f4b71Sopenharmony_ci``` 1503e41f4b71Sopenharmony_ci**Description** 1504e41f4b71Sopenharmony_ci 1505e41f4b71Sopenharmony_ciObtains the size of a request header list. 1506e41f4b71Sopenharmony_ci 1507e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1508e41f4b71Sopenharmony_ci 1509e41f4b71Sopenharmony_ci**Since**: 12 1510e41f4b71Sopenharmony_ci 1511e41f4b71Sopenharmony_ci**Parameters** 1512e41f4b71Sopenharmony_ci 1513e41f4b71Sopenharmony_ci| Name| Description| 1514e41f4b71Sopenharmony_ci| -------- | -------- | 1515e41f4b71Sopenharmony_ci| requestHeaderList | The request header list. | 1516e41f4b71Sopenharmony_ci 1517e41f4b71Sopenharmony_ci**Returns** 1518e41f4b71Sopenharmony_ci 1519e41f4b71Sopenharmony_ciThe size of the request header. If **requestHeaderList** is invalid, the value is -1. 1520e41f4b71Sopenharmony_ci 1521e41f4b71Sopenharmony_ci 1522e41f4b71Sopenharmony_ci### OH_ArkWebResourceHandler_Destroy() 1523e41f4b71Sopenharmony_ci 1524e41f4b71Sopenharmony_ci``` 1525e41f4b71Sopenharmony_ciint32_t OH_ArkWebResourceHandler_Destroy (const ArkWeb_ResourceHandler * resourceHandler) 1526e41f4b71Sopenharmony_ci``` 1527e41f4b71Sopenharmony_ci**Description** 1528e41f4b71Sopenharmony_ci 1529e41f4b71Sopenharmony_ciDestroys an **ArkWeb_ResourceHandler** object. 1530e41f4b71Sopenharmony_ci 1531e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1532e41f4b71Sopenharmony_ci 1533e41f4b71Sopenharmony_ci**Since**: 12 1534e41f4b71Sopenharmony_ci 1535e41f4b71Sopenharmony_ci**Parameters** 1536e41f4b71Sopenharmony_ci 1537e41f4b71Sopenharmony_ci| Name| Description| 1538e41f4b71Sopenharmony_ci| -------- | -------- | 1539e41f4b71Sopenharmony_ci| resourceHandler | ArkWeb_ResourceHandler. | 1540e41f4b71Sopenharmony_ci 1541e41f4b71Sopenharmony_ci**Returns** 1542e41f4b71Sopenharmony_ci 1543e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1544e41f4b71Sopenharmony_ci 1545e41f4b71Sopenharmony_ci 1546e41f4b71Sopenharmony_ci### OH_ArkWebResourceHandler_DidFailWithError() 1547e41f4b71Sopenharmony_ci 1548e41f4b71Sopenharmony_ci``` 1549e41f4b71Sopenharmony_ciint32_t OH_ArkWebResourceHandler_DidFailWithError (const ArkWeb_ResourceHandler * resourceHandler, ArkWeb_NetError errorCode ) 1550e41f4b71Sopenharmony_ci``` 1551e41f4b71Sopenharmony_ci**Description** 1552e41f4b71Sopenharmony_ci 1553e41f4b71Sopenharmony_ciNotifies the ArkWeb kernel that the intercepted request fails. 1554e41f4b71Sopenharmony_ci 1555e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1556e41f4b71Sopenharmony_ci 1557e41f4b71Sopenharmony_ci**Since**: 12 1558e41f4b71Sopenharmony_ci 1559e41f4b71Sopenharmony_ci**Parameters** 1560e41f4b71Sopenharmony_ci 1561e41f4b71Sopenharmony_ci| Name| Description| 1562e41f4b71Sopenharmony_ci| -------- | -------- | 1563e41f4b71Sopenharmony_ci| resourceHandler | The **ArkWeb_ResourceHandler** for this request. | 1564e41f4b71Sopenharmony_ci| errorCode | The error code for a request. For details, see [arkweb_net_error_list.h](arkweb__net__error__list_8h.md). | 1565e41f4b71Sopenharmony_ci 1566e41f4b71Sopenharmony_ci**Returns** 1567e41f4b71Sopenharmony_ci 1568e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1569e41f4b71Sopenharmony_ci 1570e41f4b71Sopenharmony_ci 1571e41f4b71Sopenharmony_ci### OH_ArkWebResourceHandler_DidFinish() 1572e41f4b71Sopenharmony_ci 1573e41f4b71Sopenharmony_ci``` 1574e41f4b71Sopenharmony_ciint32_t OH_ArkWebResourceHandler_DidFinish (const ArkWeb_ResourceHandler * resourceHandler) 1575e41f4b71Sopenharmony_ci``` 1576e41f4b71Sopenharmony_ci**Description** 1577e41f4b71Sopenharmony_ci 1578e41f4b71Sopenharmony_ciNotifies the ArkWeb kernel that the request is intercepted and that no more data is available. 1579e41f4b71Sopenharmony_ci 1580e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1581e41f4b71Sopenharmony_ci 1582e41f4b71Sopenharmony_ci**Since**: 12 1583e41f4b71Sopenharmony_ci 1584e41f4b71Sopenharmony_ci**Parameters** 1585e41f4b71Sopenharmony_ci 1586e41f4b71Sopenharmony_ci| Name| Description| 1587e41f4b71Sopenharmony_ci| -------- | -------- | 1588e41f4b71Sopenharmony_ci| resourceHandler | The **ArkWeb_ResourceHandler** for this request. | 1589e41f4b71Sopenharmony_ci 1590e41f4b71Sopenharmony_ci**Returns** 1591e41f4b71Sopenharmony_ci 1592e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1593e41f4b71Sopenharmony_ci 1594e41f4b71Sopenharmony_ci 1595e41f4b71Sopenharmony_ci### OH_ArkWebResourceHandler_DidReceiveData() 1596e41f4b71Sopenharmony_ci 1597e41f4b71Sopenharmony_ci``` 1598e41f4b71Sopenharmony_ciint32_t OH_ArkWebResourceHandler_DidReceiveData (const ArkWeb_ResourceHandler * resourceHandler, const uint8_t * buffer, int64_t bufLen ) 1599e41f4b71Sopenharmony_ci``` 1600e41f4b71Sopenharmony_ci**Description** 1601e41f4b71Sopenharmony_ci 1602e41f4b71Sopenharmony_ciTransfers the constructed response header to the intercepted request. 1603e41f4b71Sopenharmony_ci 1604e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1605e41f4b71Sopenharmony_ci 1606e41f4b71Sopenharmony_ci**Since**: 12 1607e41f4b71Sopenharmony_ci 1608e41f4b71Sopenharmony_ci**Parameters** 1609e41f4b71Sopenharmony_ci 1610e41f4b71Sopenharmony_ci| Name| Description| 1611e41f4b71Sopenharmony_ci| -------- | -------- | 1612e41f4b71Sopenharmony_ci| resourceHandler | The **ArkWeb_ResourceHandler** for this request. | 1613e41f4b71Sopenharmony_ci| buffer | The buffer data to be sent. | 1614e41f4b71Sopenharmony_ci| bufLen | The buffer size. | 1615e41f4b71Sopenharmony_ci 1616e41f4b71Sopenharmony_ci**Returns** 1617e41f4b71Sopenharmony_ci 1618e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1619e41f4b71Sopenharmony_ci 1620e41f4b71Sopenharmony_ci 1621e41f4b71Sopenharmony_ci### OH_ArkWebResourceHandler_DidReceiveResponse() 1622e41f4b71Sopenharmony_ci 1623e41f4b71Sopenharmony_ci``` 1624e41f4b71Sopenharmony_ciint32_t OH_ArkWebResourceHandler_DidReceiveResponse (const ArkWeb_ResourceHandler * resourceHandler, const ArkWeb_Response * response ) 1625e41f4b71Sopenharmony_ci``` 1626e41f4b71Sopenharmony_ci**Description** 1627e41f4b71Sopenharmony_ci 1628e41f4b71Sopenharmony_ciTransfers the constructed response header to the intercepted request. 1629e41f4b71Sopenharmony_ci 1630e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1631e41f4b71Sopenharmony_ci 1632e41f4b71Sopenharmony_ci**Since**: 12 1633e41f4b71Sopenharmony_ci 1634e41f4b71Sopenharmony_ci**Parameters** 1635e41f4b71Sopenharmony_ci 1636e41f4b71Sopenharmony_ci| Name| Description| 1637e41f4b71Sopenharmony_ci| -------- | -------- | 1638e41f4b71Sopenharmony_ci| resourceHandler | The **ArkWeb_ResourceHandler** for this request. | 1639e41f4b71Sopenharmony_ci| response | The **ArkWeb_Response** of the intercepted request. | 1640e41f4b71Sopenharmony_ci 1641e41f4b71Sopenharmony_ci**Returns** 1642e41f4b71Sopenharmony_ci 1643e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1644e41f4b71Sopenharmony_ci 1645e41f4b71Sopenharmony_ci 1646e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_Destroy() 1647e41f4b71Sopenharmony_ci 1648e41f4b71Sopenharmony_ci``` 1649e41f4b71Sopenharmony_ciint32_t OH_ArkWebResourceRequest_Destroy (const ArkWeb_ResourceRequest * resourceRequest) 1650e41f4b71Sopenharmony_ci``` 1651e41f4b71Sopenharmony_ci**Description** 1652e41f4b71Sopenharmony_ci 1653e41f4b71Sopenharmony_ciDestroys an **ArkWeb_ResourceRequest** object. 1654e41f4b71Sopenharmony_ci 1655e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1656e41f4b71Sopenharmony_ci 1657e41f4b71Sopenharmony_ci**Since**: 12 1658e41f4b71Sopenharmony_ci 1659e41f4b71Sopenharmony_ci**Parameters** 1660e41f4b71Sopenharmony_ci 1661e41f4b71Sopenharmony_ci| Name| Description| 1662e41f4b71Sopenharmony_ci| -------- | -------- | 1663e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1664e41f4b71Sopenharmony_ci 1665e41f4b71Sopenharmony_ci**Returns** 1666e41f4b71Sopenharmony_ci 1667e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1668e41f4b71Sopenharmony_ci 1669e41f4b71Sopenharmony_ci 1670e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_DestroyHttpBodyStream() 1671e41f4b71Sopenharmony_ci 1672e41f4b71Sopenharmony_ci``` 1673e41f4b71Sopenharmony_civoid OH_ArkWebResourceRequest_DestroyHttpBodyStream (ArkWeb_HttpBodyStream * httpBodyStream) 1674e41f4b71Sopenharmony_ci``` 1675e41f4b71Sopenharmony_ci**Description** 1676e41f4b71Sopenharmony_ci 1677e41f4b71Sopenharmony_ciDestroys an **ArkWeb_HttpBodyStream** object. 1678e41f4b71Sopenharmony_ci 1679e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1680e41f4b71Sopenharmony_ci 1681e41f4b71Sopenharmony_ci**Since**: 12 1682e41f4b71Sopenharmony_ci 1683e41f4b71Sopenharmony_ci**Parameters** 1684e41f4b71Sopenharmony_ci 1685e41f4b71Sopenharmony_ci| Name| Description| 1686e41f4b71Sopenharmony_ci| -------- | -------- | 1687e41f4b71Sopenharmony_ci| httpBodyStream | The **httpBodyStream** to be destroyed.| 1688e41f4b71Sopenharmony_ci 1689e41f4b71Sopenharmony_ci 1690e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_GetFrameUrl() 1691e41f4b71Sopenharmony_ci 1692e41f4b71Sopenharmony_ci``` 1693e41f4b71Sopenharmony_civoid OH_ArkWebResourceRequest_GetFrameUrl (const ArkWeb_ResourceRequest * resourceRequest, char ** frameUrl ) 1694e41f4b71Sopenharmony_ci``` 1695e41f4b71Sopenharmony_ci**Description** 1696e41f4b71Sopenharmony_ci 1697e41f4b71Sopenharmony_ciObtains the URL of the frame that triggers the request. 1698e41f4b71Sopenharmony_ci 1699e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1700e41f4b71Sopenharmony_ci 1701e41f4b71Sopenharmony_ci**Since**: 12 1702e41f4b71Sopenharmony_ci 1703e41f4b71Sopenharmony_ci**Parameters** 1704e41f4b71Sopenharmony_ci 1705e41f4b71Sopenharmony_ci| Name| Description| 1706e41f4b71Sopenharmony_ci| -------- | -------- | 1707e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1708e41f4b71Sopenharmony_ci| frameUrl | The URL of the frame that triggers the request. This function allocates memory for the URL string. You should release the string using **OH_ArkWeb_ReleaseString**.| 1709e41f4b71Sopenharmony_ci 1710e41f4b71Sopenharmony_ci 1711e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_GetHttpBodyStream() 1712e41f4b71Sopenharmony_ci 1713e41f4b71Sopenharmony_ci``` 1714e41f4b71Sopenharmony_civoid OH_ArkWebResourceRequest_GetHttpBodyStream (const ArkWeb_ResourceRequest * resourceRequest, ArkWeb_HttpBodyStream ** httpBodyStream ) 1715e41f4b71Sopenharmony_ci``` 1716e41f4b71Sopenharmony_ci**Description** 1717e41f4b71Sopenharmony_ci 1718e41f4b71Sopenharmony_ciCreates an **ArkWeb_HttpBodyStream** to read the uploaded data of the request. 1719e41f4b71Sopenharmony_ci 1720e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1721e41f4b71Sopenharmony_ci 1722e41f4b71Sopenharmony_ci**Since**: 12 1723e41f4b71Sopenharmony_ci 1724e41f4b71Sopenharmony_ci**Parameters** 1725e41f4b71Sopenharmony_ci 1726e41f4b71Sopenharmony_ci| Name| Description| 1727e41f4b71Sopenharmony_ci| -------- | -------- | 1728e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1729e41f4b71Sopenharmony_ci| httpBodyStream | The uploaded data of the request. This function allocates memory for **httpBodyStream**. You should use **OH_ArkWebResourceRequest_DestroyHttpBodyStream** to release **httpBodyStream**.| 1730e41f4b71Sopenharmony_ci 1731e41f4b71Sopenharmony_ci 1732e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_GetMethod() 1733e41f4b71Sopenharmony_ci 1734e41f4b71Sopenharmony_ci``` 1735e41f4b71Sopenharmony_civoid OH_ArkWebResourceRequest_GetMethod (const ArkWeb_ResourceRequest * resourceRequest, char ** method ) 1736e41f4b71Sopenharmony_ci``` 1737e41f4b71Sopenharmony_ci**Description** 1738e41f4b71Sopenharmony_ci 1739e41f4b71Sopenharmony_ciObtains the method of a request. 1740e41f4b71Sopenharmony_ci 1741e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1742e41f4b71Sopenharmony_ci 1743e41f4b71Sopenharmony_ci**Since**: 12 1744e41f4b71Sopenharmony_ci 1745e41f4b71Sopenharmony_ci**Parameters** 1746e41f4b71Sopenharmony_ci 1747e41f4b71Sopenharmony_ci| Name| Description| 1748e41f4b71Sopenharmony_ci| -------- | -------- | 1749e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1750e41f4b71Sopenharmony_ci| method | The method of a HTTP request. This function allocates memory for the **method** string. You should use **OH_ArkWeb_ReleaseString** to release the string.| 1751e41f4b71Sopenharmony_ci 1752e41f4b71Sopenharmony_ci 1753e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_GetReferrer() 1754e41f4b71Sopenharmony_ci 1755e41f4b71Sopenharmony_ci``` 1756e41f4b71Sopenharmony_civoid OH_ArkWebResourceRequest_GetReferrer (const ArkWeb_ResourceRequest * resourceRequest, char ** referrer ) 1757e41f4b71Sopenharmony_ci``` 1758e41f4b71Sopenharmony_ci**Description** 1759e41f4b71Sopenharmony_ci 1760e41f4b71Sopenharmony_ciObtains the **Referrer** of a request. 1761e41f4b71Sopenharmony_ci 1762e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1763e41f4b71Sopenharmony_ci 1764e41f4b71Sopenharmony_ci**Since**: 12 1765e41f4b71Sopenharmony_ci 1766e41f4b71Sopenharmony_ci**Parameters** 1767e41f4b71Sopenharmony_ci 1768e41f4b71Sopenharmony_ci| Name| Description| 1769e41f4b71Sopenharmony_ci| -------- | -------- | 1770e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1771e41f4b71Sopenharmony_ci| referrer | The **Referrer** of a request. This function allocates memory for the **Referrer** string. You should use **OH_ArkWeb_ReleaseString** to release the string.| 1772e41f4b71Sopenharmony_ci 1773e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_GetRequestHeaders() 1774e41f4b71Sopenharmony_ci 1775e41f4b71Sopenharmony_ci``` 1776e41f4b71Sopenharmony_civoid OH_ArkWebResourceRequest_GetRequestHeaders (const ArkWeb_ResourceRequest * resourceRequest, ArkWeb_RequestHeaderList ** requestHeaderList ) 1777e41f4b71Sopenharmony_ci``` 1778e41f4b71Sopenharmony_ci**Description** 1779e41f4b71Sopenharmony_ci 1780e41f4b71Sopenharmony_ciObtains the **OH_ArkWeb_RequestHeaderList** of a request. 1781e41f4b71Sopenharmony_ci 1782e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1783e41f4b71Sopenharmony_ci 1784e41f4b71Sopenharmony_ci**Since**: 12 1785e41f4b71Sopenharmony_ci 1786e41f4b71Sopenharmony_ci**Parameters** 1787e41f4b71Sopenharmony_ci 1788e41f4b71Sopenharmony_ci| Name| Description| 1789e41f4b71Sopenharmony_ci| -------- | -------- | 1790e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1791e41f4b71Sopenharmony_ci| requestHeaderList | The list of request headers.| 1792e41f4b71Sopenharmony_ci 1793e41f4b71Sopenharmony_ci 1794e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_GetResourceType() 1795e41f4b71Sopenharmony_ci 1796e41f4b71Sopenharmony_ci``` 1797e41f4b71Sopenharmony_ciint32_t OH_ArkWebResourceRequest_GetResourceType (const ArkWeb_ResourceRequest * resourceRequest) 1798e41f4b71Sopenharmony_ci``` 1799e41f4b71Sopenharmony_ci**Description** 1800e41f4b71Sopenharmony_ci 1801e41f4b71Sopenharmony_ciObtains the resource type of a request. 1802e41f4b71Sopenharmony_ci 1803e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1804e41f4b71Sopenharmony_ci 1805e41f4b71Sopenharmony_ci**Since**: 12 1806e41f4b71Sopenharmony_ci 1807e41f4b71Sopenharmony_ci**Parameters** 1808e41f4b71Sopenharmony_ci 1809e41f4b71Sopenharmony_ci| Name| Description| 1810e41f4b71Sopenharmony_ci| -------- | -------- | 1811e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1812e41f4b71Sopenharmony_ci 1813e41f4b71Sopenharmony_ci**Returns** 1814e41f4b71Sopenharmony_ci 1815e41f4b71Sopenharmony_ciReturns the resource type of the request. If **resourceRequest** is invalid, the value is -1. 1816e41f4b71Sopenharmony_ci 1817e41f4b71Sopenharmony_ci 1818e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_GetUrl() 1819e41f4b71Sopenharmony_ci 1820e41f4b71Sopenharmony_ci``` 1821e41f4b71Sopenharmony_civoid OH_ArkWebResourceRequest_GetUrl (const ArkWeb_ResourceRequest * resourceRequest, char ** url ) 1822e41f4b71Sopenharmony_ci``` 1823e41f4b71Sopenharmony_ci**Description** 1824e41f4b71Sopenharmony_ci 1825e41f4b71Sopenharmony_ciObtains the URL of a request. 1826e41f4b71Sopenharmony_ci 1827e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1828e41f4b71Sopenharmony_ci 1829e41f4b71Sopenharmony_ci**Since**: 12 1830e41f4b71Sopenharmony_ci 1831e41f4b71Sopenharmony_ci**Parameters** 1832e41f4b71Sopenharmony_ci 1833e41f4b71Sopenharmony_ci| Name| Description| 1834e41f4b71Sopenharmony_ci| -------- | -------- | 1835e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1836e41f4b71Sopenharmony_ci| url | The URL of a request. This function allocates memory for the URL string. You should release the string using **OH_ArkWeb_ReleaseString**.| 1837e41f4b71Sopenharmony_ci 1838e41f4b71Sopenharmony_ci 1839e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_GetUserData() 1840e41f4b71Sopenharmony_ci 1841e41f4b71Sopenharmony_ci``` 1842e41f4b71Sopenharmony_civoid* OH_ArkWebResourceRequest_GetUserData (const ArkWeb_ResourceRequest * resourceRequest) 1843e41f4b71Sopenharmony_ci``` 1844e41f4b71Sopenharmony_ci**Description** 1845e41f4b71Sopenharmony_ci 1846e41f4b71Sopenharmony_ciObtains user data from **ArkWeb_ResourceRequest**. 1847e41f4b71Sopenharmony_ci 1848e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1849e41f4b71Sopenharmony_ci 1850e41f4b71Sopenharmony_ci**Since**: 12 1851e41f4b71Sopenharmony_ci 1852e41f4b71Sopenharmony_ci**Parameters** 1853e41f4b71Sopenharmony_ci 1854e41f4b71Sopenharmony_ci| Name| Description| 1855e41f4b71Sopenharmony_ci| -------- | -------- | 1856e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1857e41f4b71Sopenharmony_ci 1858e41f4b71Sopenharmony_ci**Returns** 1859e41f4b71Sopenharmony_ci 1860e41f4b71Sopenharmony_ciReturns the user data. 1861e41f4b71Sopenharmony_ci 1862e41f4b71Sopenharmony_ci 1863e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_HasGesture() 1864e41f4b71Sopenharmony_ci 1865e41f4b71Sopenharmony_ci``` 1866e41f4b71Sopenharmony_cibool OH_ArkWebResourceRequest_HasGesture (const ArkWeb_ResourceRequest * resourceRequest) 1867e41f4b71Sopenharmony_ci``` 1868e41f4b71Sopenharmony_ci**Description** 1869e41f4b71Sopenharmony_ci 1870e41f4b71Sopenharmony_ciDetermines whether a request is triggered by the user gesture. 1871e41f4b71Sopenharmony_ci 1872e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1873e41f4b71Sopenharmony_ci 1874e41f4b71Sopenharmony_ci**Since**: 12 1875e41f4b71Sopenharmony_ci 1876e41f4b71Sopenharmony_ci**Parameters** 1877e41f4b71Sopenharmony_ci 1878e41f4b71Sopenharmony_ci| Name| Description| 1879e41f4b71Sopenharmony_ci| -------- | -------- | 1880e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1881e41f4b71Sopenharmony_ci 1882e41f4b71Sopenharmony_ci**Returns** 1883e41f4b71Sopenharmony_ci 1884e41f4b71Sopenharmony_ciReturns **true** if this is triggered by a user gesture; otherwise returns false. 1885e41f4b71Sopenharmony_ci 1886e41f4b71Sopenharmony_ci 1887e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_IsMainFrame() 1888e41f4b71Sopenharmony_ci 1889e41f4b71Sopenharmony_ci``` 1890e41f4b71Sopenharmony_cibool OH_ArkWebResourceRequest_IsMainFrame (const ArkWeb_ResourceRequest * resourceRequest) 1891e41f4b71Sopenharmony_ci``` 1892e41f4b71Sopenharmony_ci**Description** 1893e41f4b71Sopenharmony_ci 1894e41f4b71Sopenharmony_ciDetermines whether a request is from the main frame. 1895e41f4b71Sopenharmony_ci 1896e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1897e41f4b71Sopenharmony_ci 1898e41f4b71Sopenharmony_ci**Since**: 12 1899e41f4b71Sopenharmony_ci 1900e41f4b71Sopenharmony_ci**Parameters** 1901e41f4b71Sopenharmony_ci 1902e41f4b71Sopenharmony_ci| Name| Description| 1903e41f4b71Sopenharmony_ci| -------- | -------- | 1904e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1905e41f4b71Sopenharmony_ci 1906e41f4b71Sopenharmony_ci**Returns** 1907e41f4b71Sopenharmony_ci 1908e41f4b71Sopenharmony_ciReturns **true** if this is from the main framework; otherwise returns **false**. 1909e41f4b71Sopenharmony_ci 1910e41f4b71Sopenharmony_ci 1911e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_IsRedirect() 1912e41f4b71Sopenharmony_ci 1913e41f4b71Sopenharmony_ci``` 1914e41f4b71Sopenharmony_cibool OH_ArkWebResourceRequest_IsRedirect (const ArkWeb_ResourceRequest * resourceRequest) 1915e41f4b71Sopenharmony_ci``` 1916e41f4b71Sopenharmony_ci**Description** 1917e41f4b71Sopenharmony_ci 1918e41f4b71Sopenharmony_ciDetermines whether a request is redirect. 1919e41f4b71Sopenharmony_ci 1920e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1921e41f4b71Sopenharmony_ci 1922e41f4b71Sopenharmony_ci**Since**: 12 1923e41f4b71Sopenharmony_ci 1924e41f4b71Sopenharmony_ci**Parameters** 1925e41f4b71Sopenharmony_ci 1926e41f4b71Sopenharmony_ci| Name| Description| 1927e41f4b71Sopenharmony_ci| -------- | -------- | 1928e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1929e41f4b71Sopenharmony_ci 1930e41f4b71Sopenharmony_ci**Returns** 1931e41f4b71Sopenharmony_ci 1932e41f4b71Sopenharmony_ciIf this is a redirection, **true** is returned. Otherwise, **false** is returned. 1933e41f4b71Sopenharmony_ci 1934e41f4b71Sopenharmony_ci 1935e41f4b71Sopenharmony_ci### OH_ArkWebResourceRequest_SetUserData() 1936e41f4b71Sopenharmony_ci 1937e41f4b71Sopenharmony_ci``` 1938e41f4b71Sopenharmony_ciint32_t OH_ArkWebResourceRequest_SetUserData (ArkWeb_ResourceRequest * resourceRequest, void * userData ) 1939e41f4b71Sopenharmony_ci``` 1940e41f4b71Sopenharmony_ci**Description** 1941e41f4b71Sopenharmony_ci 1942e41f4b71Sopenharmony_ciSets user data to the **ArkWeb_ResourceRequest** object. 1943e41f4b71Sopenharmony_ci 1944e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1945e41f4b71Sopenharmony_ci 1946e41f4b71Sopenharmony_ci**Since**: 12 1947e41f4b71Sopenharmony_ci 1948e41f4b71Sopenharmony_ci**Parameters** 1949e41f4b71Sopenharmony_ci 1950e41f4b71Sopenharmony_ci| Name| Description| 1951e41f4b71Sopenharmony_ci| -------- | -------- | 1952e41f4b71Sopenharmony_ci| resourceRequest | ArkWeb_ResourceRequest. | 1953e41f4b71Sopenharmony_ci| userData | The user data to be set. | 1954e41f4b71Sopenharmony_ci 1955e41f4b71Sopenharmony_ci**Returns** 1956e41f4b71Sopenharmony_ci 1957e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 1958e41f4b71Sopenharmony_ci 1959e41f4b71Sopenharmony_ci 1960e41f4b71Sopenharmony_ci### OH_ArkWebResponse_GetCharset() 1961e41f4b71Sopenharmony_ci 1962e41f4b71Sopenharmony_ci``` 1963e41f4b71Sopenharmony_civoid OH_ArkWebResponse_GetCharset (const ArkWeb_Response * response, char ** charset ) 1964e41f4b71Sopenharmony_ci``` 1965e41f4b71Sopenharmony_ci**Description** 1966e41f4b71Sopenharmony_ci 1967e41f4b71Sopenharmony_ciObtains the character set of **ArkWeb_Response**. 1968e41f4b71Sopenharmony_ci 1969e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1970e41f4b71Sopenharmony_ci 1971e41f4b71Sopenharmony_ci**Since**: 12 1972e41f4b71Sopenharmony_ci 1973e41f4b71Sopenharmony_ci**Parameters** 1974e41f4b71Sopenharmony_ci 1975e41f4b71Sopenharmony_ci| Name| Description| 1976e41f4b71Sopenharmony_ci| -------- | -------- | 1977e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 1978e41f4b71Sopenharmony_ci| charset | The character set of **ArkWeb_Response**. This function allocates memory for the **charset** string. You need to release the string using **OH_ArkWeb_ReleaseString**.| 1979e41f4b71Sopenharmony_ci 1980e41f4b71Sopenharmony_ci 1981e41f4b71Sopenharmony_ci### OH_ArkWebResponse_GetError() 1982e41f4b71Sopenharmony_ci 1983e41f4b71Sopenharmony_ci``` 1984e41f4b71Sopenharmony_ciArkWeb_NetError OH_ArkWebResponse_GetError (const ArkWeb_Response * response) 1985e41f4b71Sopenharmony_ci``` 1986e41f4b71Sopenharmony_ci**Description** 1987e41f4b71Sopenharmony_ci 1988e41f4b71Sopenharmony_ciObtains the error code of **ArkWeb_Response**. 1989e41f4b71Sopenharmony_ci 1990e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 1991e41f4b71Sopenharmony_ci 1992e41f4b71Sopenharmony_ci**Since**: 12 1993e41f4b71Sopenharmony_ci 1994e41f4b71Sopenharmony_ci**Parameters** 1995e41f4b71Sopenharmony_ci 1996e41f4b71Sopenharmony_ci| Name| Description| 1997e41f4b71Sopenharmony_ci| -------- | -------- | 1998e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 1999e41f4b71Sopenharmony_ci 2000e41f4b71Sopenharmony_ci**Returns** 2001e41f4b71Sopenharmony_ci 2002e41f4b71Sopenharmony_ciThe error code of **ArkWeb_Response**. 2003e41f4b71Sopenharmony_ci 2004e41f4b71Sopenharmony_ci 2005e41f4b71Sopenharmony_ci### OH_ArkWebResponse_GetHeaderByName() 2006e41f4b71Sopenharmony_ci 2007e41f4b71Sopenharmony_ci``` 2008e41f4b71Sopenharmony_civoid OH_ArkWebResponse_GetHeaderByName (const ArkWeb_Response * response, const char * name, char ** value ) 2009e41f4b71Sopenharmony_ci``` 2010e41f4b71Sopenharmony_ci**Description** 2011e41f4b71Sopenharmony_ci 2012e41f4b71Sopenharmony_ciObtains the header from **ArkWeb_Response**. 2013e41f4b71Sopenharmony_ci 2014e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2015e41f4b71Sopenharmony_ci 2016e41f4b71Sopenharmony_ci**Since**: 12 2017e41f4b71Sopenharmony_ci 2018e41f4b71Sopenharmony_ci**Parameters** 2019e41f4b71Sopenharmony_ci 2020e41f4b71Sopenharmony_ci| Name| Description| 2021e41f4b71Sopenharmony_ci| -------- | -------- | 2022e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2023e41f4b71Sopenharmony_ci| name | The name of a header. | 2024e41f4b71Sopenharmony_ci| value | The value of a header. This function allocates memory for the **value **string. You need to release the string using **OH_ArkWeb_ReleaseString**.| 2025e41f4b71Sopenharmony_ci 2026e41f4b71Sopenharmony_ci 2027e41f4b71Sopenharmony_ci### OH_ArkWebResponse_GetMimeType() 2028e41f4b71Sopenharmony_ci 2029e41f4b71Sopenharmony_ci``` 2030e41f4b71Sopenharmony_civoid OH_ArkWebResponse_GetMimeType (const ArkWeb_Response * response, char ** mimeType ) 2031e41f4b71Sopenharmony_ci``` 2032e41f4b71Sopenharmony_ci**Description** 2033e41f4b71Sopenharmony_ci 2034e41f4b71Sopenharmony_ciObtains the mime type of **ArkWeb_Response**. 2035e41f4b71Sopenharmony_ci 2036e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2037e41f4b71Sopenharmony_ci 2038e41f4b71Sopenharmony_ci**Since**: 12 2039e41f4b71Sopenharmony_ci 2040e41f4b71Sopenharmony_ci**Parameters** 2041e41f4b71Sopenharmony_ci 2042e41f4b71Sopenharmony_ci| Name| Description| 2043e41f4b71Sopenharmony_ci| -------- | -------- | 2044e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2045e41f4b71Sopenharmony_ci| mimeType | The mime type of **ArkWeb_Response**. This function will allocate memory for the **mimeType** string. You need to release the string using **OH_ArkWeb_ReleaseString**.| 2046e41f4b71Sopenharmony_ci 2047e41f4b71Sopenharmony_ci 2048e41f4b71Sopenharmony_ci### OH_ArkWebResponse_GetStatus() 2049e41f4b71Sopenharmony_ci 2050e41f4b71Sopenharmony_ci``` 2051e41f4b71Sopenharmony_ciint OH_ArkWebResponse_GetStatus (const ArkWeb_Response * response) 2052e41f4b71Sopenharmony_ci``` 2053e41f4b71Sopenharmony_ci**Description** 2054e41f4b71Sopenharmony_ci 2055e41f4b71Sopenharmony_ciObtains the HTTP status code of **ArkWeb_Response**. 2056e41f4b71Sopenharmony_ci 2057e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2058e41f4b71Sopenharmony_ci 2059e41f4b71Sopenharmony_ci**Since**: 12 2060e41f4b71Sopenharmony_ci 2061e41f4b71Sopenharmony_ci**Parameters** 2062e41f4b71Sopenharmony_ci 2063e41f4b71Sopenharmony_ci| Name| Description| 2064e41f4b71Sopenharmony_ci| -------- | -------- | 2065e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2066e41f4b71Sopenharmony_ci 2067e41f4b71Sopenharmony_ci**Returns** 2068e41f4b71Sopenharmony_ci 2069e41f4b71Sopenharmony_ciThe HTTP status code of **ArkWeb_Response**. If **ArkWeb_Response** is invalid, the value is **-1**. 2070e41f4b71Sopenharmony_ci 2071e41f4b71Sopenharmony_ci 2072e41f4b71Sopenharmony_ci### OH_ArkWebResponse_GetStatusText() 2073e41f4b71Sopenharmony_ci 2074e41f4b71Sopenharmony_ci``` 2075e41f4b71Sopenharmony_civoid OH_ArkWebResponse_GetStatusText (const ArkWeb_Response * response, char ** statusText ) 2076e41f4b71Sopenharmony_ci``` 2077e41f4b71Sopenharmony_ci**Description** 2078e41f4b71Sopenharmony_ci 2079e41f4b71Sopenharmony_ciObtains the status text of **ArkWeb_Response**. 2080e41f4b71Sopenharmony_ci 2081e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2082e41f4b71Sopenharmony_ci 2083e41f4b71Sopenharmony_ci**Since**: 12 2084e41f4b71Sopenharmony_ci 2085e41f4b71Sopenharmony_ci**Parameters** 2086e41f4b71Sopenharmony_ci 2087e41f4b71Sopenharmony_ci| Name| Description| 2088e41f4b71Sopenharmony_ci| -------- | -------- | 2089e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2090e41f4b71Sopenharmony_ci| statusText | The status text of **ArkWeb_Response**. This function allocates memory for the **statusText** string. You need to release the string using **OH_ArkWeb_ReleaseString**.| 2091e41f4b71Sopenharmony_ci 2092e41f4b71Sopenharmony_ci 2093e41f4b71Sopenharmony_ci### OH_ArkWebResponse_GetUrl() 2094e41f4b71Sopenharmony_ci 2095e41f4b71Sopenharmony_ci``` 2096e41f4b71Sopenharmony_civoid OH_ArkWebResponse_GetUrl (const ArkWeb_Response * response, char ** url ) 2097e41f4b71Sopenharmony_ci``` 2098e41f4b71Sopenharmony_ci**Description** 2099e41f4b71Sopenharmony_ci 2100e41f4b71Sopenharmony_ciObtains the parsed URL that is redirected or changed due to HSTS. 2101e41f4b71Sopenharmony_ci 2102e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2103e41f4b71Sopenharmony_ci 2104e41f4b71Sopenharmony_ci**Since**: 12 2105e41f4b71Sopenharmony_ci 2106e41f4b71Sopenharmony_ci**Parameters** 2107e41f4b71Sopenharmony_ci 2108e41f4b71Sopenharmony_ci| Name| Description| 2109e41f4b71Sopenharmony_ci| -------- | -------- | 2110e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2111e41f4b71Sopenharmony_ci| url | The parsed URL.| 2112e41f4b71Sopenharmony_ci 2113e41f4b71Sopenharmony_ci 2114e41f4b71Sopenharmony_ci### OH_ArkWebResponse_SetCharset() 2115e41f4b71Sopenharmony_ci 2116e41f4b71Sopenharmony_ci``` 2117e41f4b71Sopenharmony_ciint32_t OH_ArkWebResponse_SetCharset (ArkWeb_Response * response, const char * charset ) 2118e41f4b71Sopenharmony_ci``` 2119e41f4b71Sopenharmony_ci**Description** 2120e41f4b71Sopenharmony_ci 2121e41f4b71Sopenharmony_ciSets the character set for **ArkWeb_Response**. 2122e41f4b71Sopenharmony_ci 2123e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2124e41f4b71Sopenharmony_ci 2125e41f4b71Sopenharmony_ci**Since**: 12 2126e41f4b71Sopenharmony_ci 2127e41f4b71Sopenharmony_ci**Parameters** 2128e41f4b71Sopenharmony_ci 2129e41f4b71Sopenharmony_ci| Name| Description| 2130e41f4b71Sopenharmony_ci| -------- | -------- | 2131e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2132e41f4b71Sopenharmony_ci| charset | The character set of a request. | 2133e41f4b71Sopenharmony_ci 2134e41f4b71Sopenharmony_ci**Returns** 2135e41f4b71Sopenharmony_ci 2136e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2137e41f4b71Sopenharmony_ci 2138e41f4b71Sopenharmony_ci 2139e41f4b71Sopenharmony_ci### OH_ArkWebResponse_SetError() 2140e41f4b71Sopenharmony_ci 2141e41f4b71Sopenharmony_ci``` 2142e41f4b71Sopenharmony_ciint32_t OH_ArkWebResponse_SetError (ArkWeb_Response * response, ArkWeb_NetError errorCode ) 2143e41f4b71Sopenharmony_ci``` 2144e41f4b71Sopenharmony_ci**Description** 2145e41f4b71Sopenharmony_ci 2146e41f4b71Sopenharmony_ciSets an error code for the **ArkWeb_Response** object. 2147e41f4b71Sopenharmony_ci 2148e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2149e41f4b71Sopenharmony_ci 2150e41f4b71Sopenharmony_ci**Since**: 12 2151e41f4b71Sopenharmony_ci 2152e41f4b71Sopenharmony_ci**Parameters** 2153e41f4b71Sopenharmony_ci 2154e41f4b71Sopenharmony_ci| Name| Description| 2155e41f4b71Sopenharmony_ci| -------- | -------- | 2156e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2157e41f4b71Sopenharmony_ci| errorCode | Error code of a failed request. | 2158e41f4b71Sopenharmony_ci 2159e41f4b71Sopenharmony_ci**Returns** 2160e41f4b71Sopenharmony_ci 2161e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2162e41f4b71Sopenharmony_ci 2163e41f4b71Sopenharmony_ci 2164e41f4b71Sopenharmony_ci### OH_ArkWebResponse_SetHeaderByName() 2165e41f4b71Sopenharmony_ci 2166e41f4b71Sopenharmony_ci``` 2167e41f4b71Sopenharmony_ciint32_t OH_ArkWebResponse_SetHeaderByName (ArkWeb_Response * response, const char * name, const char * value, bool overwrite ) 2168e41f4b71Sopenharmony_ci``` 2169e41f4b71Sopenharmony_ci**Description** 2170e41f4b71Sopenharmony_ci 2171e41f4b71Sopenharmony_ciSets a header for **ArkWeb_Response**. 2172e41f4b71Sopenharmony_ci 2173e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2174e41f4b71Sopenharmony_ci 2175e41f4b71Sopenharmony_ci**Since**: 12 2176e41f4b71Sopenharmony_ci 2177e41f4b71Sopenharmony_ci**Parameters** 2178e41f4b71Sopenharmony_ci 2179e41f4b71Sopenharmony_ci| Name| Description| 2180e41f4b71Sopenharmony_ci| -------- | -------- | 2181e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2182e41f4b71Sopenharmony_ci| name | The name of a header. | 2183e41f4b71Sopenharmony_ci| value | The value of a header. | 2184e41f4b71Sopenharmony_ci| overwirte | If the value is **true**, the existing header is overwritten. Otherwise, the existing header is not overwritten. | 2185e41f4b71Sopenharmony_ci 2186e41f4b71Sopenharmony_ci**Returns** 2187e41f4b71Sopenharmony_ci 2188e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2189e41f4b71Sopenharmony_ci 2190e41f4b71Sopenharmony_ci 2191e41f4b71Sopenharmony_ci### OH_ArkWebResponse_SetMimeType() 2192e41f4b71Sopenharmony_ci 2193e41f4b71Sopenharmony_ci``` 2194e41f4b71Sopenharmony_ciint32_t OH_ArkWebResponse_SetMimeType (ArkWeb_Response * response, const char * mimeType ) 2195e41f4b71Sopenharmony_ci``` 2196e41f4b71Sopenharmony_ci**Description** 2197e41f4b71Sopenharmony_ci 2198e41f4b71Sopenharmony_ciSets the mime type for **ArkWeb_Response**. 2199e41f4b71Sopenharmony_ci 2200e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2201e41f4b71Sopenharmony_ci 2202e41f4b71Sopenharmony_ci**Since**: 12 2203e41f4b71Sopenharmony_ci 2204e41f4b71Sopenharmony_ci**Parameters** 2205e41f4b71Sopenharmony_ci 2206e41f4b71Sopenharmony_ci| Name| Description| 2207e41f4b71Sopenharmony_ci| -------- | -------- | 2208e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2209e41f4b71Sopenharmony_ci| mimeType | The mime type of a request. | 2210e41f4b71Sopenharmony_ci 2211e41f4b71Sopenharmony_ci**Returns** 2212e41f4b71Sopenharmony_ci 2213e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2214e41f4b71Sopenharmony_ci 2215e41f4b71Sopenharmony_ci 2216e41f4b71Sopenharmony_ci### OH_ArkWebResponse_SetStatus() 2217e41f4b71Sopenharmony_ci 2218e41f4b71Sopenharmony_ci``` 2219e41f4b71Sopenharmony_ciint32_t OH_ArkWebResponse_SetStatus (ArkWeb_Response * response, int status ) 2220e41f4b71Sopenharmony_ci``` 2221e41f4b71Sopenharmony_ci**Description** 2222e41f4b71Sopenharmony_ci 2223e41f4b71Sopenharmony_ciSets an HTTP status code for the **ArkWeb_Response** object. 2224e41f4b71Sopenharmony_ci 2225e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2226e41f4b71Sopenharmony_ci 2227e41f4b71Sopenharmony_ci**Since**: 12 2228e41f4b71Sopenharmony_ci 2229e41f4b71Sopenharmony_ci**Parameters** 2230e41f4b71Sopenharmony_ci 2231e41f4b71Sopenharmony_ci| Name| Description| 2232e41f4b71Sopenharmony_ci| -------- | -------- | 2233e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2234e41f4b71Sopenharmony_ci| status | The HTTP status code of a request. | 2235e41f4b71Sopenharmony_ci 2236e41f4b71Sopenharmony_ci**Returns** 2237e41f4b71Sopenharmony_ci 2238e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2239e41f4b71Sopenharmony_ci 2240e41f4b71Sopenharmony_ci 2241e41f4b71Sopenharmony_ci### OH_ArkWebResponse_SetStatusText() 2242e41f4b71Sopenharmony_ci 2243e41f4b71Sopenharmony_ci``` 2244e41f4b71Sopenharmony_ciint32_t OH_ArkWebResponse_SetStatusText (ArkWeb_Response * response, const char * statusText ) 2245e41f4b71Sopenharmony_ci``` 2246e41f4b71Sopenharmony_ci**Description** 2247e41f4b71Sopenharmony_ci 2248e41f4b71Sopenharmony_ciSets the status text for **ArkWeb_Response**. 2249e41f4b71Sopenharmony_ci 2250e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2251e41f4b71Sopenharmony_ci 2252e41f4b71Sopenharmony_ci**Since**: 12 2253e41f4b71Sopenharmony_ci 2254e41f4b71Sopenharmony_ci**Parameters** 2255e41f4b71Sopenharmony_ci 2256e41f4b71Sopenharmony_ci| Name| Description| 2257e41f4b71Sopenharmony_ci| -------- | -------- | 2258e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2259e41f4b71Sopenharmony_ci| statusText | The status text of a request. | 2260e41f4b71Sopenharmony_ci 2261e41f4b71Sopenharmony_ci**Returns** 2262e41f4b71Sopenharmony_ci 2263e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2264e41f4b71Sopenharmony_ci 2265e41f4b71Sopenharmony_ci 2266e41f4b71Sopenharmony_ci### OH_ArkWebResponse_SetUrl() 2267e41f4b71Sopenharmony_ci 2268e41f4b71Sopenharmony_ci``` 2269e41f4b71Sopenharmony_ciint32_t OH_ArkWebResponse_SetUrl (ArkWeb_Response * response, const char * url ) 2270e41f4b71Sopenharmony_ci``` 2271e41f4b71Sopenharmony_ci**Description** 2272e41f4b71Sopenharmony_ci 2273e41f4b71Sopenharmony_ciSets the parsed URL that is redirected or changed due to HSTS. After the setting, redirection is triggered. 2274e41f4b71Sopenharmony_ci 2275e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2276e41f4b71Sopenharmony_ci 2277e41f4b71Sopenharmony_ci**Since**: 12 2278e41f4b71Sopenharmony_ci 2279e41f4b71Sopenharmony_ci**Parameters** 2280e41f4b71Sopenharmony_ci 2281e41f4b71Sopenharmony_ci| Name| Description| 2282e41f4b71Sopenharmony_ci| -------- | -------- | 2283e41f4b71Sopenharmony_ci| response | ArkWeb_Response. | 2284e41f4b71Sopenharmony_ci| url | The parsed URL. | 2285e41f4b71Sopenharmony_ci 2286e41f4b71Sopenharmony_ci**Returns** 2287e41f4b71Sopenharmony_ci 2288e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2289e41f4b71Sopenharmony_ci 2290e41f4b71Sopenharmony_ci 2291e41f4b71Sopenharmony_ci### OH_ArkWebSchemeHandler_GetUserData() 2292e41f4b71Sopenharmony_ci 2293e41f4b71Sopenharmony_ci``` 2294e41f4b71Sopenharmony_civoid* OH_ArkWebSchemeHandler_GetUserData (const ArkWeb_SchemeHandler * schemeHandler) 2295e41f4b71Sopenharmony_ci``` 2296e41f4b71Sopenharmony_ci**Description** 2297e41f4b71Sopenharmony_ci 2298e41f4b71Sopenharmony_ciObtains the user data from **ArkWeb_SchemeHandler**. 2299e41f4b71Sopenharmony_ci 2300e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2301e41f4b71Sopenharmony_ci 2302e41f4b71Sopenharmony_ci**Since**: 12 2303e41f4b71Sopenharmony_ci 2304e41f4b71Sopenharmony_ci**Parameters** 2305e41f4b71Sopenharmony_ci 2306e41f4b71Sopenharmony_ci| Name| Description| 2307e41f4b71Sopenharmony_ci| -------- | -------- | 2308e41f4b71Sopenharmony_ci| schemeHandler | ArkWeb_SchemeHandler. | 2309e41f4b71Sopenharmony_ci 2310e41f4b71Sopenharmony_ci**Returns** 2311e41f4b71Sopenharmony_ci 2312e41f4b71Sopenharmony_ciReturns the user data. 2313e41f4b71Sopenharmony_ci 2314e41f4b71Sopenharmony_ci 2315e41f4b71Sopenharmony_ci### OH_ArkWebSchemeHandler_SetOnRequestStart() 2316e41f4b71Sopenharmony_ci 2317e41f4b71Sopenharmony_ci``` 2318e41f4b71Sopenharmony_ciint32_t OH_ArkWebSchemeHandler_SetOnRequestStart (ArkWeb_SchemeHandler * schemeHandler, ArkWeb_OnRequestStart onRequestStart ) 2319e41f4b71Sopenharmony_ci``` 2320e41f4b71Sopenharmony_ci**Description** 2321e41f4b71Sopenharmony_ci 2322e41f4b71Sopenharmony_ciSets an **OnRequestStart** callback for **SchemeHandler**. 2323e41f4b71Sopenharmony_ci 2324e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2325e41f4b71Sopenharmony_ci 2326e41f4b71Sopenharmony_ci**Since**: 12 2327e41f4b71Sopenharmony_ci 2328e41f4b71Sopenharmony_ci**Parameters** 2329e41f4b71Sopenharmony_ci 2330e41f4b71Sopenharmony_ci| Name| Description| 2331e41f4b71Sopenharmony_ci| -------- | -------- | 2332e41f4b71Sopenharmony_ci| schemeHandler | The **SchemeHandler** for this scheme. | 2333e41f4b71Sopenharmony_ci| onRequestStart | The callback function **OnRequestStart**. | 2334e41f4b71Sopenharmony_ci 2335e41f4b71Sopenharmony_ci**Returns** 2336e41f4b71Sopenharmony_ci 2337e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2338e41f4b71Sopenharmony_ci 2339e41f4b71Sopenharmony_ci 2340e41f4b71Sopenharmony_ci### OH_ArkWebSchemeHandler_SetOnRequestStop() 2341e41f4b71Sopenharmony_ci 2342e41f4b71Sopenharmony_ci``` 2343e41f4b71Sopenharmony_ciint32_t OH_ArkWebSchemeHandler_SetOnRequestStop (ArkWeb_SchemeHandler * schemeHandler, ArkWeb_OnRequestStop onRequestStop ) 2344e41f4b71Sopenharmony_ci``` 2345e41f4b71Sopenharmony_ci**Description** 2346e41f4b71Sopenharmony_ci 2347e41f4b71Sopenharmony_ciSets an **OnRequestStop** callback for **SchemeHandler**. 2348e41f4b71Sopenharmony_ci 2349e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2350e41f4b71Sopenharmony_ci 2351e41f4b71Sopenharmony_ci**Since**: 12 2352e41f4b71Sopenharmony_ci 2353e41f4b71Sopenharmony_ci**Parameters** 2354e41f4b71Sopenharmony_ci 2355e41f4b71Sopenharmony_ci| Name| Description| 2356e41f4b71Sopenharmony_ci| -------- | -------- | 2357e41f4b71Sopenharmony_ci| schemeHandler | The **SchemeHandler** for this scheme. | 2358e41f4b71Sopenharmony_ci| onRequestStop | The callback function **OnRequestStop**. | 2359e41f4b71Sopenharmony_ci 2360e41f4b71Sopenharmony_ci**Returns** 2361e41f4b71Sopenharmony_ci 2362e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2363e41f4b71Sopenharmony_ci 2364e41f4b71Sopenharmony_ci 2365e41f4b71Sopenharmony_ci### OH_ArkWebSchemeHandler_SetUserData() 2366e41f4b71Sopenharmony_ci 2367e41f4b71Sopenharmony_ci``` 2368e41f4b71Sopenharmony_ciint32_t OH_ArkWebSchemeHandler_SetUserData (ArkWeb_SchemeHandler * schemeHandler, void * userData ) 2369e41f4b71Sopenharmony_ci``` 2370e41f4b71Sopenharmony_ci**Description** 2371e41f4b71Sopenharmony_ci 2372e41f4b71Sopenharmony_ciSets a user data to the **ArkWeb_SchemeHandler** object. 2373e41f4b71Sopenharmony_ci 2374e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2375e41f4b71Sopenharmony_ci 2376e41f4b71Sopenharmony_ci**Since**: 12 2377e41f4b71Sopenharmony_ci 2378e41f4b71Sopenharmony_ci**Parameters** 2379e41f4b71Sopenharmony_ci 2380e41f4b71Sopenharmony_ci| Name| Description| 2381e41f4b71Sopenharmony_ci| -------- | -------- | 2382e41f4b71Sopenharmony_ci| schemeHandler | ArkWeb_SchemeHandler. | 2383e41f4b71Sopenharmony_ci| userData | The user data to be set. | 2384e41f4b71Sopenharmony_ci 2385e41f4b71Sopenharmony_ci**Returns** 2386e41f4b71Sopenharmony_ci 2387e41f4b71Sopenharmony_ciIf **0** is returned, the operation is successful. If **17100101** is returned, the parameter is invalid. 2388e41f4b71Sopenharmony_ci 2389e41f4b71Sopenharmony_ci 2390e41f4b71Sopenharmony_ci### OH_ArkWebServiceWorker_ClearSchemeHandlers() 2391e41f4b71Sopenharmony_ci 2392e41f4b71Sopenharmony_ci``` 2393e41f4b71Sopenharmony_ciint32_t OH_ArkWebServiceWorker_ClearSchemeHandlers () 2394e41f4b71Sopenharmony_ci``` 2395e41f4b71Sopenharmony_ci**Description** 2396e41f4b71Sopenharmony_ci 2397e41f4b71Sopenharmony_ciClears the **SchemeHandler** registered for **ServiceWorker**. 2398e41f4b71Sopenharmony_ci 2399e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2400e41f4b71Sopenharmony_ci 2401e41f4b71Sopenharmony_ci**Since**: 12 2402e41f4b71Sopenharmony_ci 2403e41f4b71Sopenharmony_ci**Returns** 2404e41f4b71Sopenharmony_ci 2405e41f4b71Sopenharmony_ciIf the operation is successful, **0** is returned; otherwise, an error code is returned. 2406e41f4b71Sopenharmony_ci 2407e41f4b71Sopenharmony_ci 2408e41f4b71Sopenharmony_ci### OH_ArkWebServiceWorker_SetSchemeHandler() 2409e41f4b71Sopenharmony_ci 2410e41f4b71Sopenharmony_ci``` 2411e41f4b71Sopenharmony_cibool OH_ArkWebServiceWorker_SetSchemeHandler (const char * scheme, ArkWeb_SchemeHandler * schemeHandler ) 2412e41f4b71Sopenharmony_ci``` 2413e41f4b71Sopenharmony_ci**Description** 2414e41f4b71Sopenharmony_ci 2415e41f4b71Sopenharmony_ciSets an **ArkWeb_SchemeHandler** for a specified scheme to intercept requests of this scheme triggered by **ServiceWorker**. 2416e41f4b71Sopenharmony_ci 2417e41f4b71Sopenharmony_ciThe **SchemeHandler** should be set after **BrowserContext** is created. 2418e41f4b71Sopenharmony_ci 2419e41f4b71Sopenharmony_ciYou can use **WebviewController.initializeWebEngine** to initialize **BrowserContext** without creating the ArkWeb component. 2420e41f4b71Sopenharmony_ci 2421e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2422e41f4b71Sopenharmony_ci 2423e41f4b71Sopenharmony_ci**Since**: 12 2424e41f4b71Sopenharmony_ci 2425e41f4b71Sopenharmony_ci**Parameters** 2426e41f4b71Sopenharmony_ci 2427e41f4b71Sopenharmony_ci| Name| Description| 2428e41f4b71Sopenharmony_ci| -------- | -------- | 2429e41f4b71Sopenharmony_ci| scheme | The scheme to be intercepted. | 2430e41f4b71Sopenharmony_ci| schemeHandler | The **ArkWeb_SchemeHandler** for this scheme. Only requests triggered by the **ServiceWorker** are notified through this **schemeHandler**. | 2431e41f4b71Sopenharmony_ci 2432e41f4b71Sopenharmony_ci**Returns** 2433e41f4b71Sopenharmony_ci 2434e41f4b71Sopenharmony_ciIf the **SchemeHandler** is successfully set for the specified scheme, **true** is returned. Otherwise, **false** is returned. 2435e41f4b71Sopenharmony_ci 2436e41f4b71Sopenharmony_ci 2437e41f4b71Sopenharmony_ci### OH_NativeArkWeb_GetDestroyCallback() 2438e41f4b71Sopenharmony_ci 2439e41f4b71Sopenharmony_ci``` 2440e41f4b71Sopenharmony_ciNativeArkWeb_OnDestroyCallback OH_NativeArkWeb_GetDestroyCallback (const char * webTag) 2441e41f4b71Sopenharmony_ci``` 2442e41f4b71Sopenharmony_ci**Description** 2443e41f4b71Sopenharmony_ci 2444e41f4b71Sopenharmony_ciObtains the callback used when a registered component is destroyed. 2445e41f4b71Sopenharmony_ci 2446e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2447e41f4b71Sopenharmony_ci 2448e41f4b71Sopenharmony_ci**Since**: 11 2449e41f4b71Sopenharmony_ci 2450e41f4b71Sopenharmony_ci**Parameters** 2451e41f4b71Sopenharmony_ci 2452e41f4b71Sopenharmony_ci| Name| Description| 2453e41f4b71Sopenharmony_ci| -------- | -------- | 2454e41f4b71Sopenharmony_ci| webTag | The name of a \<Web> component. | 2455e41f4b71Sopenharmony_ci 2456e41f4b71Sopenharmony_ci**Returns** 2457e41f4b71Sopenharmony_ci 2458e41f4b71Sopenharmony_ciReturns the callback used when a registered component is destroyed. 2459e41f4b71Sopenharmony_ci 2460e41f4b71Sopenharmony_ci 2461e41f4b71Sopenharmony_ci### OH_NativeArkWeb_GetJavaScriptProxyValidCallback() 2462e41f4b71Sopenharmony_ci 2463e41f4b71Sopenharmony_ci``` 2464e41f4b71Sopenharmony_ciNativeArkWeb_OnValidCallback OH_NativeArkWeb_GetJavaScriptProxyValidCallback (const char * webTag) 2465e41f4b71Sopenharmony_ci``` 2466e41f4b71Sopenharmony_ci**Description** 2467e41f4b71Sopenharmony_ci 2468e41f4b71Sopenharmony_ciObtains the callback used when a registered object is valid. 2469e41f4b71Sopenharmony_ci 2470e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2471e41f4b71Sopenharmony_ci 2472e41f4b71Sopenharmony_ci**Since**: 11 2473e41f4b71Sopenharmony_ci 2474e41f4b71Sopenharmony_ci**Parameters** 2475e41f4b71Sopenharmony_ci 2476e41f4b71Sopenharmony_ci| Name| Description| 2477e41f4b71Sopenharmony_ci| -------- | -------- | 2478e41f4b71Sopenharmony_ci| webTag | The name of a \<Web> component. | 2479e41f4b71Sopenharmony_ci 2480e41f4b71Sopenharmony_ci**Returns** 2481e41f4b71Sopenharmony_ci 2482e41f4b71Sopenharmony_ciReturns the callback used when a registered object is valid. 2483e41f4b71Sopenharmony_ci 2484e41f4b71Sopenharmony_ci 2485e41f4b71Sopenharmony_ci### OH_NativeArkWeb_RegisterJavaScriptProxy() 2486e41f4b71Sopenharmony_ci 2487e41f4b71Sopenharmony_ci``` 2488e41f4b71Sopenharmony_civoid OH_NativeArkWeb_RegisterJavaScriptProxy (const char * webTag, const char * objName, const char ** methodList, NativeArkWeb_OnJavaScriptProxyCallback * callback, int32_t size, bool needRefresh ) 2489e41f4b71Sopenharmony_ci``` 2490e41f4b71Sopenharmony_ci**Description** 2491e41f4b71Sopenharmony_ci 2492e41f4b71Sopenharmony_ciLists the registered objects and function names. 2493e41f4b71Sopenharmony_ci 2494e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2495e41f4b71Sopenharmony_ci 2496e41f4b71Sopenharmony_ci**Since**: 11 2497e41f4b71Sopenharmony_ci 2498e41f4b71Sopenharmony_ci**Parameters** 2499e41f4b71Sopenharmony_ci 2500e41f4b71Sopenharmony_ci| Name| Description| 2501e41f4b71Sopenharmony_ci| -------- | -------- | 2502e41f4b71Sopenharmony_ci| webTag | The name of a \<Web> component. | 2503e41f4b71Sopenharmony_ci| objName | The name of the injected object. | 2504e41f4b71Sopenharmony_ci| methodList | The name of the injected function list. | 2505e41f4b71Sopenharmony_ci| callback | The injected callback function. | 2506e41f4b71Sopenharmony_ci| size | The number of the injected callback functions. | 2507e41f4b71Sopenharmony_ci| needRefresh | Whether a page need to be refreshed.| 2508e41f4b71Sopenharmony_ci 2509e41f4b71Sopenharmony_ci 2510e41f4b71Sopenharmony_ci### OH_NativeArkWeb_RunJavaScript() 2511e41f4b71Sopenharmony_ci 2512e41f4b71Sopenharmony_ci``` 2513e41f4b71Sopenharmony_civoid OH_NativeArkWeb_RunJavaScript (const char * webTag, const char * jsCode, NativeArkWeb_OnJavaScriptCallback callback ) 2514e41f4b71Sopenharmony_ci``` 2515e41f4b71Sopenharmony_ci**Description** 2516e41f4b71Sopenharmony_ci 2517e41f4b71Sopenharmony_ciRuns a piece of JavaScript code in the displaying page. 2518e41f4b71Sopenharmony_ci 2519e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2520e41f4b71Sopenharmony_ci 2521e41f4b71Sopenharmony_ci**Since**: 11 2522e41f4b71Sopenharmony_ci 2523e41f4b71Sopenharmony_ci**Parameters** 2524e41f4b71Sopenharmony_ci 2525e41f4b71Sopenharmony_ci| Name| Description| 2526e41f4b71Sopenharmony_ci| -------- | -------- | 2527e41f4b71Sopenharmony_ci| webTag | The name of a \<Web> component. | 2528e41f4b71Sopenharmony_ci| jsCode | A piece of JavaScript code script. | 2529e41f4b71Sopenharmony_ci| callback | The callback used to notify the result after code is executed.| 2530e41f4b71Sopenharmony_ci 2531e41f4b71Sopenharmony_ci 2532e41f4b71Sopenharmony_ci### OH_NativeArkWeb_SetDestroyCallback() 2533e41f4b71Sopenharmony_ci 2534e41f4b71Sopenharmony_ci``` 2535e41f4b71Sopenharmony_civoid OH_NativeArkWeb_SetDestroyCallback (const char * webTag, NativeArkWeb_OnDestroyCallback callback ) 2536e41f4b71Sopenharmony_ci``` 2537e41f4b71Sopenharmony_ci**Description** 2538e41f4b71Sopenharmony_ci 2539e41f4b71Sopenharmony_ciSets a callback used when a component is destroyed. 2540e41f4b71Sopenharmony_ci 2541e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2542e41f4b71Sopenharmony_ci 2543e41f4b71Sopenharmony_ci**Since**: 11 2544e41f4b71Sopenharmony_ci 2545e41f4b71Sopenharmony_ci**Parameters** 2546e41f4b71Sopenharmony_ci 2547e41f4b71Sopenharmony_ci| Name| Description| 2548e41f4b71Sopenharmony_ci| -------- | -------- | 2549e41f4b71Sopenharmony_ci| webTag | The name of a \<Web> component. | 2550e41f4b71Sopenharmony_ci| callback | The callback used when a component is destroyed.| 2551e41f4b71Sopenharmony_ci 2552e41f4b71Sopenharmony_ci 2553e41f4b71Sopenharmony_ci### OH_NativeArkWeb_SetJavaScriptProxyValidCallback() 2554e41f4b71Sopenharmony_ci 2555e41f4b71Sopenharmony_ci``` 2556e41f4b71Sopenharmony_civoid OH_NativeArkWeb_SetJavaScriptProxyValidCallback (const char * webTag, NativeArkWeb_OnValidCallback callback ) 2557e41f4b71Sopenharmony_ci``` 2558e41f4b71Sopenharmony_ci**Description** 2559e41f4b71Sopenharmony_ci 2560e41f4b71Sopenharmony_ciSets a callback used when an object is valid. 2561e41f4b71Sopenharmony_ci 2562e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2563e41f4b71Sopenharmony_ci 2564e41f4b71Sopenharmony_ci**Since**: 11 2565e41f4b71Sopenharmony_ci 2566e41f4b71Sopenharmony_ci**Parameters** 2567e41f4b71Sopenharmony_ci 2568e41f4b71Sopenharmony_ci| Name| Description| 2569e41f4b71Sopenharmony_ci| -------- | -------- | 2570e41f4b71Sopenharmony_ci| webTag | The name of a \<Web> component. | 2571e41f4b71Sopenharmony_ci| callback | The callback used when an object is valid.| 2572e41f4b71Sopenharmony_ci 2573e41f4b71Sopenharmony_ci 2574e41f4b71Sopenharmony_ci### OH_NativeArkWeb_UnregisterJavaScriptProxy() 2575e41f4b71Sopenharmony_ci 2576e41f4b71Sopenharmony_ci``` 2577e41f4b71Sopenharmony_civoid OH_NativeArkWeb_UnregisterJavaScriptProxy (const char * webTag, const char * objName ) 2578e41f4b71Sopenharmony_ci``` 2579e41f4b71Sopenharmony_ci**Description** 2580e41f4b71Sopenharmony_ci 2581e41f4b71Sopenharmony_ciDeletes a registered object and its callback. 2582e41f4b71Sopenharmony_ci 2583e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Web.Webview.Core 2584e41f4b71Sopenharmony_ci 2585e41f4b71Sopenharmony_ci**Since**: 11 2586e41f4b71Sopenharmony_ci 2587e41f4b71Sopenharmony_ci**Parameters** 2588e41f4b71Sopenharmony_ci 2589e41f4b71Sopenharmony_ci| Name| Description| 2590e41f4b71Sopenharmony_ci| -------- | -------- | 2591e41f4b71Sopenharmony_ci| webTag | The name of a \<Web> component. | 2592e41f4b71Sopenharmony_ci| objName | The name of the injected object.| 2593e41f4b71Sopenharmony_ci 2594e41f4b71Sopenharmony_ci<!--no_check-->