chttp · Section 3
CHTTP_BODY
NAME
CHTTP_BODY - construct a chttp_request_body with an explicit content type
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttp.h> CHTTP_BODY(data_ptr, data_len, content_type_str)
DESCRIPTION
This macro expands to an initializer for a chttp_request_body built
from the data pointer, the length and the Content-Type string you pass.
data_ptr A pointer to the body bytes. The macro does not copy
them.
data_len The length of the body in bytes.
content_type_str The value string of the Content-Type header.
EXAMPLES
chttp_request_body body = CHTTP_BODY(buf, len, "application/octet-stream");