C Collections

chttpclient · Section 3

chttpcli_construct_scoped

chttpcli_construct_scoped - declare and initialize a chttpcli handle that the library destroys automatically

C Collections (libccollections, -lccollections)

#include <ccollections/chttpclient.h>
 
chttpcli_construct_scoped(name)

This macro is chttpcli_declare_scoped followed by chttpcli_create.
It declares name with the GCC cleanup attribute, calls
chttpcli_create and stores the result in name, so the client is
destroyed automatically when name leaves the scope. If the creation
fails, the macro calls ccol__fatal_err() and does not return.

name     The identifier of the new handle variable.

chttpcli_construct(3), chttpcli_declare_scoped(3)