~aleteoryx/muditaos

ref: 9095333b2c10af0127725c41c854c53453f41787 muditaos/module-services/service-desktop/parser/ParserUtils.cpp -rw-r--r-- 434 bytes
9095333b — Bartek Cichocki [EGD-3502] PR fixes 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "ParserUtils.hpp"

using namespace parserFSM;

bool http::isMethodValid(uint8_t method)
{
    if (method == static_cast<uint8_t>(http::Method::get) || method == static_cast<uint8_t>(http::Method::post) ||
        method == static_cast<uint8_t>(http::Method::put) || method == static_cast<uint8_t>(http::Method::del)) {
        return true;
    }
    else {
        LOG_ERROR("Invalid method!");
        return false;
    }
}