diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-13 22:33:12 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-05-13 22:33:12 +0200 |
commit | cd00813c0740930d389f935f0c2d7d8a11eef02d (patch) | |
tree | ad1d20704e6707b5fcb734876c4a0cbed860c297 /minion/src/http/request.hpp | |
parent | fc1a41c627f25c1fa52c87d002d08870fa8876ac (diff) |
refactor(minion): wifi module create http request object in stack
Diffstat (limited to 'minion/src/http/request.hpp')
-rw-r--r-- | minion/src/http/request.hpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/minion/src/http/request.hpp b/minion/src/http/request.hpp index 85af722..8524dc6 100644 --- a/minion/src/http/request.hpp +++ b/minion/src/http/request.hpp @@ -25,7 +25,7 @@ class HTTPRequest { public: explicit HTTPRequest( - size_t connection_id, + int connection_id, HTTPRequestMethod method, char *http_version, char *path, @@ -35,11 +35,11 @@ public: HTTPRequest(const HTTPRequest &other) noexcept = delete; - HTTPRequest(HTTPRequest &&other) noexcept = delete; + HTTPRequest(HTTPRequest &&other) noexcept; ~HTTPRequest() noexcept; - auto connection_id() const noexcept -> size_t; + auto connection_id() const noexcept -> int; auto method() const noexcept -> HTTPRequestMethod; @@ -53,13 +53,17 @@ public: auto operator=(const HTTPRequest &other) noexcept -> HTTPRequest & = delete; - auto operator=(HTTPRequest &&other) noexcept -> HTTPRequest & = delete; + auto operator=(HTTPRequest &&other) noexcept -> HTTPRequest &; + + static HTTPRequest create_invalid() noexcept; private: - const size_t _connection_id; + const int _connection_id; const HTTPRequestMethod _method; char *_http_version; char *_path; const int _data_length; char *_data; + + HTTPRequest() noexcept; }; |