C Collections

chttpclient · Section 3

chttp_request_create

chttp_request_create - allocate and initialize an HTTP request (default allocator)

C Collections (libccollections, -lccollections)

#include <ccollections/chttpclient.h>
 
chttp_request *chttp_request_create(chttp_method method,
                                      const char *url,
                                      const chttp_request_body *body,
                                      char **err_str);

This is an inline wrapper around chttp_request_create_mp that passes NULL
for mprocs.

A pointer to the new request, or NULL if the call fails. It fails for
a NULL url, for a method that names no HTTP method (CHTTP_ANY
included), for a NULL body->data with a body->len that is not zero,
and when an allocation fails. See chttp_request_create_mp(3).

chttp_request_create_mp(3)