Skip to main content

OH_Http_SetHeaderValue

Function OH_Http_SetHeaderValue 

Source
pub unsafe extern "C" fn OH_Http_SetHeaderValue(
    headers: *mut Http_Headers,
    name: *const c_char,
    value: *const c_char,
) -> u32
Available on crate features api-11 and api-20 only.
Expand description

Sets the key-value pair of the request or response header.

§Arguments

  • headers - Pointer to the Http_Headers to be set.

  • name - Key.

  • value - Value.

§Returns

  • uint32_t 0 - success. 401 - Parameter error. 2300027 - Out of memory.

Required System Capabilities: SystemCapability.Communication.NetStack

Available since API-level: 20