chttpclient · Section 3
chttp_request_create
NAME
chttp_request_create - allocate and initialize an HTTP request (default allocator)
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttpclient.h>
chttp_request *chttp_request_create(chttp_method method,
const char *url,
const chttp_request_body *body,
char **err_str);
DESCRIPTION
This is an inline wrapper around chttp_request_create_mp that passes NULL for mprocs.
RETURN VALUE
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).