summaryrefslogtreecommitdiff
path: root/minion/src/http
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-16 13:49:54 +0200
committerHampusM <hampus@hampusmat.com>2022-05-16 13:50:31 +0200
commit0529ac97653bc535c5c1db832d258f661d69309c (patch)
tree48c0b6ded9d82e01d5e96f12c66e0a9b6d385618 /minion/src/http
parent3ede86caf948d6e989fd056ea4f8d8c588939971 (diff)
refactor(minion): improve network code readability
Diffstat (limited to 'minion/src/http')
-rw-r--r--minion/src/http/request.cpp6
-rw-r--r--minion/src/http/request.hpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/minion/src/http/request.cpp b/minion/src/http/request.cpp
index 650f57f..6a3f722 100644
--- a/minion/src/http/request.cpp
+++ b/minion/src/http/request.cpp
@@ -129,14 +129,14 @@ auto HTTPRequest::operator=(HTTPRequest &&other) noexcept -> HTTPRequest &
return *this;
}
-HTTPRequest HTTPRequest::create_invalid() noexcept
+auto HTTPRequest::create_invalid() noexcept -> HTTPRequest
{
- return HTTPRequest();
+ return {};
}
HTTPRequest::HTTPRequest() noexcept
: _connection(-1),
- _method(HTTPRequestMethod(-1)),
+ _method(HTTPRequestMethod::GET),
_http_version(""),
_path(""),
_data_length(0),
diff --git a/minion/src/http/request.hpp b/minion/src/http/request.hpp
index dae66f2..fc95473 100644
--- a/minion/src/http/request.hpp
+++ b/minion/src/http/request.hpp
@@ -57,7 +57,7 @@ public:
auto operator=(HTTPRequest &&other) noexcept -> HTTPRequest &;
- static HTTPRequest create_invalid() noexcept;
+ static auto create_invalid() noexcept -> HTTPRequest;
private:
NetworkConnection _connection;