C Collections

chttpclient · Section 3

chttp_request_free

chttp_request_free - free an HTTP request and every resource that it owns

C Collections (libccollections, -lccollections)

#include <ccollections/chttpclient.h>
 
void chttp_request_free(chttp_request *req);

This function frees the request's copies of the URL, the body data and
content_type, its header map, the request struct itself, and the
private copy of mprocs if the library made one. The URL and body
copies are freed with the request's allocator, so the url and body
fields must hold the same pointers that chttp_request_create_mp put
there; see chttp_request_create_mp(3).
 
Passing NULL is safe.

chttp_request_create_mp(3)