chttpclient · Section 3
chttp_post
NAME
chttp_post - do a POST request with the default client
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttpclient.h>
ccol_retval chttp_post(const char *url,
const chttp_request_body *body,
chttpcli_response **resp_out);
DESCRIPTION
This is a convenience wrapper that sends an HTTP POST. Pass a NULL body for a POST without one.
RETURN VALUE
The same codes as chttpcli_do, plus ccol_invalid_args for a body whose data is NULL while its len is not zero, which chttp_request_create refuses. ccol_not_enough_memory also covers a failed allocation of the internal request object.