pub unsafe extern "C" fn OH_Http_Request(
request: *mut Http_Request,
callback: Http_ResponseCallback,
handler: Http_EventsHandler,
) -> c_intAvailable on crate features
api-11 and api-20 only.Expand description
Initiates an HTTP request.
§Arguments
-
request- Pointer toHttp_Request. -
callback- Http response info, pointer toHttp_ResponseCallback -
handler- Callbacks to watch different events, pointer toHttp_EventsHandler.
§Returns
- 0 if success; non-0 otherwise. For details about error codes, see
Http_ErrCode. ohos.permission.INTERNET
Required System Capabilities: SystemCapability.Communication.NetStack
Available since API-level: 20