pub unsafe extern "C" fn httpd_req_get_hdr_value_len(
    r: *mut httpd_req_t,
    field: *const c_char
) -> usize
Expand description

@brief Search for a field in request headers and return the string length of it’s value

@note

  • This API is supposed to be called only from the context of a URI handler where httpd_req_t* request pointer is valid.
  • Once httpd_resp_send() API is called all request headers are purged, so request headers need be copied into separate buffers if they are required later.

@param[in] r The request being responded to @param[in] field The header field to be searched in the request

@return

  • Length : If field is found in the request URL
  • Zero : Field not found / Invalid request / Null arguments