chttpclient · Section 3
chttpcli_resp_free
NAME
chttpcli_resp_free - free a response and every resource that it owns
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttpclient.h> void chttpcli_resp_free(chttpcli_response *resp);
DESCRIPTION
This function frees the body buffer, the header map and the response struct itself. Passing NULL is safe.
NOTES
A response keeps its own copy of the allocator procs of the client that made it and holds no reference to that client, so you can free it before or after the client is destroyed with chttpcli_destroy. The functions of a custom allocator must be callable at the time of that free.
SEE ALSO
chttpcli_resp_header_count(3), chttpcli_resp_header_at(3), chttpcli_do(3), chttpcli_resp_header(3)