diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-13 21:00:25 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-05-13 21:00:25 +0200 |
commit | fc1a41c627f25c1fa52c87d002d08870fa8876ac (patch) | |
tree | 78ad84e86d69dd986127735d3967fc670703f4b9 /minion/src/wifi_module.hpp | |
parent | 481ef51ac14ad5b3bf0935dd6110b6a7d8afe731 (diff) |
fix(minion): conform to the http/1.1 response syntax
Diffstat (limited to 'minion/src/wifi_module.hpp')
-rw-r--r-- | minion/src/wifi_module.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/minion/src/wifi_module.hpp b/minion/src/wifi_module.hpp index 9852d1e..447f056 100644 --- a/minion/src/wifi_module.hpp +++ b/minion/src/wifi_module.hpp @@ -19,6 +19,9 @@ constexpr auto TIMEOUT_SHORT = 1500U; constexpr auto TIMEOUT_MEDIUM = 4000U; constexpr auto TIMEOUT_LONG = 10000U; +constexpr auto RESPONSE_HTTP_VERSION = "HTTP/1.1"; +constexpr auto RESPONSE_STATUS_CODE_LENGTH = 3U; + enum WifiMode { Station = 1, @@ -95,7 +98,9 @@ public: auto close_connection(size_t connection_id) noexcept -> bool; - auto send_response(size_t connection_id, const char *data) noexcept -> bool; + auto + send_response(size_t connection_id, size_t status_code, const char *data) noexcept + -> bool; private: SoftwareSerial _serial; |