summaryrefslogtreecommitdiff
path: root/deps/llhttp/src
diff options
context:
space:
mode:
Diffstat (limited to 'deps/llhttp/src')
-rw-r--r--deps/llhttp/src/api.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/deps/llhttp/src/api.c b/deps/llhttp/src/api.c
index 37a5dcd183..45227b35af 100644
--- a/deps/llhttp/src/api.c
+++ b/deps/llhttp/src/api.c
@@ -117,6 +117,16 @@ const char* llhttp_errno_name(llhttp_errno_t err) {
}
+const char* llhttp_method_name(llhttp_method_t method) {
+#define HTTP_METHOD_GEN(NUM, NAME, STRING) case HTTP_##NAME: return #STRING;
+ switch (method) {
+ HTTP_METHOD_MAP(HTTP_METHOD_GEN)
+ default: abort();
+ }
+#undef HTTP_METHOD_GEN
+}
+
+
/* Callbacks */