ANNA Suite  2020b
Multipurpose development suite for Telco applications
Request.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_http_Request_hpp
10 #define anna_http_Request_hpp
11 
12 #include <anna/http/Message.hpp>
13 #include <anna/http/Method.hpp>
14 
15 namespace anna {
16 
17 namespace http {
18 
22 class Request : public Message {
23 public:
27  explicit Request() : Message(Message::Type::Request) {;}
28 
33  Method::Type::_v getMethod() const { return a_method; }
34 
39  const std::string& getURI() const { return a_uri; }
40 
45  void setMethod(const Method::Type::_v method) { a_method = method; }
46 
51  void setURI(const std::string& uri) { a_uri = uri; }
52 
57  std::string asString() const ;
58 
59 private:
60  Method::Type::_v a_method;
61  std::string a_uri;
62 
63  std::string codeStartLine() const noexcept(false);
64 };
65 
66 }
67 }
68 
69 #endif
70 
Definition: Message.hpp:30
Definition: Request.hpp:22
Request()
Definition: Request.hpp:27
Definition: Message.hpp:45
const std::string & getURI() const
Definition: Request.hpp:39
void setURI(const std::string &uri)
Definition: Request.hpp:51
std::string asString() const
Method::Type::_v getMethod() const
Definition: Request.hpp:33
Definition: app.hpp:12
_v
Definition: Method.hpp:33
void setMethod(const Method::Type::_v method)
Definition: Request.hpp:45