C Collections

chttpclient · Section 3

chttp_get

chttp_get - do a GET request with the default client

C Collections (libccollections, -lccollections)

#include <ccollections/chttpclient.h>
 
ccol_retval chttp_get(const char *url,
                        chttpcli_response **resp_out);

This is a convenience wrapper that builds a CHTTP_GET request for url,
runs it with the default client and frees it again.

url       The target URL. It must not be NULL.
resp_out  It must not be NULL. The function sets it to NULL first,
          and stores the pointer to the response there if the call
          succeeds.

The same codes as chttpcli_do.

chttp_post(3), chttp_put(3), chttp_delete(3), chttp_patch(3), chttp_do_default(3)