Next: , Previous: , Up: microhttpd-responses   [Contents][Index]


8.5 Inspecting a response object

Function: int MHD_get_response_headers (struct MHD_Response *response, MHD_KeyValueIterator iterator, void *iterator_cls)

Get all of the headers added to a response.

Invoke the iterator callback for each header in the response, using iterator_cls as first argument. Return number of entries iterated over. iterator can be NULL: in this case the function just counts headers.

iterator should not modify the its key and value arguments, unless we know what we are doing.

Function: const char * MHD_get_response_header (struct MHD_Response *response, const char *key)

Find and return a pointer to the value of a particular header from the response. key must reference a zero-terminated string representing the header to look for. The search is case sensitive. Return NULL if header does not exist or key is NULL.

We should not modify the value, unless we know what we are doing.