#ifndef TILE_NET_HTTP_HTTP_REQUEST_H
#define TILE_NET_HTTP_HTTP_REQUEST_H

#pragma once

#include "tile/base/string.h"
#include "tile/net/http/http_message.h"
#include "tile/net/http/types.h"

namespace tile {
class HttpRequest : private http::HttpMessage {
public:
    using HttpMessage::set_version;
    using HttpMessage::version;

    HttpMethod method() const noexcept { return method_; }

    void set_method(HttpMethod m) noexcept { method_ = m; }

    const std::string &uri() const noexcept { return uri_; }

    void set_uri(std::string u) { uri_ = std::move(u); }

    using HttpMessage::body;
    using HttpMessage::body_size;
    using HttpMessage::headers;
    using HttpMessage::noncontiguous_body;
    using HttpMessage::set_body;

    void clear() noexcept;

    std::string ToString() const;

private:
    HttpMethod method_{HttpMethod::Unspecified};
    std::string uri_;
};
}// namespace tile

#endif// TILE_NET_HTTP_HTTP_REQUEST_H
