/*********************************/ /* */ /* o.riabenkyi@gmail.com */ /* */ /*********************************/ #ifndef REQUEST_HPP #define REQUEST_HPP #include #include #include #include #include namespace webserv { enum class Method { Get, Post, Delete }; const char* toString(Method method) noexcept; bool headerNameEquals(std::string_view a, std::string_view b) noexcept; enum class HttpVersion { Http10, Http11 }; struct Request { Method method; std::string target; HttpVersion version; std::vector> headers; std::vector body; std::optional header(std::string_view name) const noexcept; }; } #endif