#ifndef HTTP_REQUEST_HPP
#define HTTP_REQUEST_HPP

#include <string>
#include <vector>
#include <map>
#include "header.hpp"


namespace http::server {
    class Url {
    public:
        explicit Url(const std::string& url);

        std::string path;
        std::map<std::string, std::string> params;

        ~Url();
    };

    /// A request received from a client.
    struct Request {
        std::string method;
        std::string queryUri;
        std::unique_ptr<Url> url;
        bool is_keep_alive;
        int http_version_major;
        int http_version_minor;
        std::vector<header> headers;
    };
} // namespace http::Server


#endif // HTTP_REQUEST_HPP
