chttpclient · Section 3
chttp_request_get_header
NAME
chttp_request_get_header - look up a request header by name
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttpclient.h>
const char *chttp_request_get_header(const chttp_request *req,
const char *name);
DESCRIPTION
This function returns the stored value of the named header, or NULL if the request has no such header. The lookup ignores case, because the function lowercases your name before it looks it up. The returned pointer stays valid until the next call to chttp_request_set_header on this request, or until the request is freed.
PARAMETERS
req The request to query. It can be NULL, in which case the
function returns NULL.
name The header name. It can be NULL, in which case the function
returns NULL.
RETURN VALUE
A pointer to the stored value string, or NULL if the header is not there.