Mercurial > hg > orthanc
diff Core/RestApi/RestApi.cpp @ 355:753e69f9326e
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Jan 2013 17:56:44 +0100 |
parents | daff912c9ffe |
children | bdd72233b105 |
line wrap: on
line diff
--- a/Core/RestApi/RestApi.cpp Wed Jan 30 14:34:36 2013 +0100 +++ b/Core/RestApi/RestApi.cpp Wed Jan 30 17:56:44 2013 +0100 @@ -180,7 +180,7 @@ } void RestApi::Handle(HttpOutput& output, - const std::string& method, + Orthanc_HttpMethod method, const UriComponents& uri, const Arguments& headers, const Arguments& getArguments, @@ -191,7 +191,7 @@ RestApiPath::Components components; UriComponents trailing; - if (method == "GET") + if (method == Orthanc_HttpMethod_Get) { for (GetHandlers::const_iterator it = getHandlers_.begin(); it != getHandlers_.end(); it++) @@ -213,7 +213,7 @@ } } } - else if (method == "PUT") + else if (method == Orthanc_HttpMethod_Put) { for (PutHandlers::const_iterator it = putHandlers_.begin(); it != putHandlers_.end(); it++) @@ -235,7 +235,7 @@ } } } - else if (method == "POST") + else if (method == Orthanc_HttpMethod_Post) { for (PostHandlers::const_iterator it = postHandlers_.begin(); it != postHandlers_.end(); it++) @@ -257,7 +257,7 @@ } } } - else if (method == "DELETE") + else if (method == Orthanc_HttpMethod_Delete) { for (DeleteHandlers::const_iterator it = deleteHandlers_.begin(); it != deleteHandlers_.end(); it++)