63 lines
1.0 KiB
C++
63 lines
1.0 KiB
C++
|
#ifndef seafire__protocol__request_hxx_
|
||
|
#define seafire__protocol__request_hxx_
|
||
|
|
||
|
#include <seafire/protocol/message.hxx>
|
||
|
|
||
|
#include <seafire/common/io/buffer.hxx>
|
||
|
|
||
|
#include <code/uri/uri.hxx>
|
||
|
|
||
|
#include <ostream>
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
|
||
|
namespace seafire::protocol
|
||
|
{
|
||
|
|
||
|
class request_t
|
||
|
: public message_t
|
||
|
{
|
||
|
public:
|
||
|
request_t();
|
||
|
|
||
|
request_t(std::string, std::string, version_t);
|
||
|
|
||
|
std::string const&
|
||
|
method() const;
|
||
|
|
||
|
void
|
||
|
set_method(std::string);
|
||
|
|
||
|
std::string const&
|
||
|
target() const;
|
||
|
|
||
|
void
|
||
|
set_target(std::string);
|
||
|
|
||
|
code::uri::uri_t const&
|
||
|
target_uri() const;
|
||
|
|
||
|
void
|
||
|
set_target_uri(code::uri::uri_t);
|
||
|
|
||
|
private:
|
||
|
std::string method_;
|
||
|
std::string target_;
|
||
|
code::uri::uri_t target_uri_;
|
||
|
std::string query_;
|
||
|
|
||
|
};
|
||
|
|
||
|
void
|
||
|
to_buffers(common::io::const_buffers_t&, request_t const&);
|
||
|
|
||
|
common::io::const_buffers_t
|
||
|
to_buffers(request_t const&);
|
||
|
|
||
|
std::ostream&
|
||
|
operator<<(std::ostream&, request_t const&);
|
||
|
|
||
|
} // namespace seafire::protocol
|
||
|
|
||
|
#endif
|