1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #include <anna/http/Method.hpp>
10 #include <anna/http/internal/Token.hpp>
15 anna_assign_enum(http::Method::Type) = {
16 "POST", "OPTIONS", "GET", "HEAD", "PUT", "DELETE", "TRACE", "CONNECT", NULL
19 http::Method::Type::_v http::Method::asType(const http::Token* token)
21 for(int ii = 0; anna_item_enum(http::Method::Type, ii) != NULL; ii ++) {
22 if(token->match(anna_item_enum(http::Method::Type, ii)) == true)
29 string http::Method::asString(const http::Method::Type::_v type)
31 string result("http::Method { Name: ");
32 result += Type::asCString(type);
33 return result += " }";