#include "lnm/http/consts.h" const char *lnm_http_method_names[] = {"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"}; const size_t lnm_http_method_names_len = sizeof(lnm_http_method_names) / sizeof(lnm_http_method_names[0]); // clang-format off const char *lnm_http_status_names[][32] = { // 1xx { "Continue", // 100 "Switching Protocols", // 101, "Processing", // 102 "Early Hints", // 103 }, // 2xx { "OK", // 200 "Created", // 201 "Accepted", // 202 "Non-Authoritative Information", // 203 "No Content", // 204 "Reset Content", // 205 "Partial Content", // 206 "Multi-Status", // 207 "Already Reported", // 208 }, // 3xx { "Multiple Choices", // 300 "Moved Permanently", // 301 "Found", // 302 "See Other", // 303 "Not Modified", // 304 NULL, // 305 NULL, // 306 "Temporary Redirect", // 307 "Permanent Redirect", // 308 }, // 4xx { "Bad Request", // 400 "Unauthorized", // 401 "Payment Required", // 402 "Forbidden", // 403 "Not Found", // 404 "Method Not Allowed", // 405 "Not Acceptable", // 406 "Proxy Authentication Required", // 407 "Request Timeout", // 408 "Conflict", // 409 "Gone", // 410 "Length Required", // 411 "Precondition Failed", // 412 "Content Too Large", // 413 "URI Too Long", // 414 "Unsupported Media Type", // 415 "Range Not Satisfiable", // 416 "Expectation Failed", // 417 "I'm a teapot", // 418 NULL, // 419 NULL, // 420 "Misdirected Request", // 421 "Unprocessable Content", // 422 "Locked", // 423 "Failed Dependency", // 424 "Too Early", // 425 "Upgrade Required", // 426 NULL, // 427 "Precondition Required", // 428 "Too Many Requests", // 429 NULL, // 430 "Request Header Fields Too Large", // 431 }, // 5xx { "Internal Server Error", // 500 "Not Implemented", // 501 "Bad Gateway", // 502 "Service Unavailable", // 503 "Gateway Timeout", // 504 "HTTP Version Not Supported", // 505 "Variant Also Negotiates", // 506 "Insufficient Storage", // 507 "Loop Detected", // 508 NULL, // 509 "Not Extended", // 510 "Network Authentication Required" // 511 }, }; const char *lnm_http_header_names[] = { "Connection", "Location", "Content-Type", "Content-Disposition", "Server", "Content-Length" };