From fc1a41c627f25c1fa52c87d002d08870fa8876ac Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 13 May 2022 21:00:25 +0200 Subject: fix(minion): conform to the http/1.1 response syntax --- minion/src/wifi_module.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'minion/src/wifi_module.hpp') 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; -- cgit v1.2.3-18-g5258