11#include <promeki/config.h>
12#if PROMEKI_ENABLE_HTTP
17PROMEKI_NAMESPACE_BEGIN
39class HttpMethod :
public TypedEnum<HttpMethod> {
41 PROMEKI_REGISTER_ENUM_TYPE(
"HttpMethod", 0, {
"GET", 0}, {
"HEAD", 1}, {
"POST", 2}, {
"PUT", 3},
42 {
"DELETE", 4}, {
"PATCH", 5}, {
"OPTIONS", 6}, {
"CONNECT", 7}, {
"TRACE", 8});
44 using TypedEnum<HttpMethod>::TypedEnum;
46 static const HttpMethod Get;
47 static const HttpMethod Head;
48 static const HttpMethod Post;
49 static const HttpMethod Put;
50 static const HttpMethod Delete;
51 static const HttpMethod Patch;
52 static const HttpMethod Options;
53 static const HttpMethod Connect;
54 static const HttpMethod Trace;
64 String wireName()
const;
74 bool allowsBody()
const;
77inline const HttpMethod HttpMethod::Get{0};
78inline const HttpMethod HttpMethod::Head{1};
79inline const HttpMethod HttpMethod::Post{2};
80inline const HttpMethod HttpMethod::Put{3};
81inline const HttpMethod HttpMethod::Delete{4};
82inline const HttpMethod HttpMethod::Patch{5};
83inline const HttpMethod HttpMethod::Options{6};
84inline const HttpMethod HttpMethod::Connect{7};
85inline const HttpMethod HttpMethod::Trace{8};