From bf4caea902d730f98ee70b5edfa349089799e76d Mon Sep 17 00:00:00 2001 From: anschrammh Date: Thu, 7 Apr 2022 01:19:03 +0200 Subject: [PATCH] Started to implement the : static const char *httpStatusToString(HTTP_CODE c) method --- src/app/HttpConstants.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/HttpConstants.h b/src/app/HttpConstants.h index 80ed2f9..10b6827 100644 --- a/src/app/HttpConstants.h +++ b/src/app/HttpConstants.h @@ -137,6 +137,17 @@ class HttpConstants } } + static const char *httpStatusToString(HTTP_CODE c) + { + switch(c) + { + case HTTP_CODE_PARTIAL_CONTENT: + return HTTPCONSTANTS_STRING("206 Partial Content"); + break; + default: + return HTTPCONSTANTS_STRING("200 OK"); + } + } protected: private: };