C Collections

chttp · Section 3

chttp_method_str

chttp_method_str - give the canonical string for an HTTP method

C Collections (libccollections, -lccollections)

#include <ccollections/chttp.h>
 
const char *chttp_method_str(chttp_method m);

This function returns the uppercase ASCII name of a method, such as
"GET" or "POST".  CHTTP_ANY gives "ANY", although CHTTP_ANY is only a
sentinel for server routes and never a real HTTP method.  Any value
that the enum does not name gives "UNKNOWN".

A pointer to a static string literal.  You must not free it.

chttp_request_create(3), chttpsvr_req_method(3)