C Collections

chttpclient · Section 3

chttpcli_resp_free

chttpcli_resp_free - free a response and every resource that it owns

C Collections (libccollections, -lccollections)

#include <ccollections/chttpclient.h>
 
void chttpcli_resp_free(chttpcli_response *resp);

This function frees the body buffer, the header map and the response
struct itself. Passing NULL is safe.

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.

chttpcli_resp_header_count(3), chttpcli_resp_header_at(3), chttpcli_do(3), chttpcli_resp_header(3)