Mercurial > hg > orthanc
comparison Core/RestApi/RestApi.cpp @ 895:7e8cde5905fd plugins
allow superposition of REST handlers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 16 Jun 2014 17:47:58 +0200 |
parents | a811bdf8b8eb |
children | 7d88f3f4a3b3 |
comparison
equal
deleted
inserted
replaced
894:690aeb4cb899 | 895:7e8cde5905fd |
---|---|
178 IsPutAccepted(uri) || | 178 IsPutAccepted(uri) || |
179 IsPostAccepted(uri) || | 179 IsPostAccepted(uri) || |
180 IsDeleteAccepted(uri)); | 180 IsDeleteAccepted(uri)); |
181 } | 181 } |
182 | 182 |
183 void RestApi::Handle(HttpOutput& output, | 183 bool RestApi::Handle(HttpOutput& output, |
184 HttpMethod method, | 184 HttpMethod method, |
185 const UriComponents& uri, | 185 const UriComponents& uri, |
186 const Arguments& headers, | 186 const Arguments& headers, |
187 const Arguments& getArguments, | 187 const Arguments& getArguments, |
188 const std::string& postData) | 188 const std::string& postData) |
253 { | 253 { |
254 LOG(INFO) << "REST method " << EnumerationToString(method) | 254 LOG(INFO) << "REST method " << EnumerationToString(method) |
255 << " not allowed on: " << Toolbox::FlattenUri(uri); | 255 << " not allowed on: " << Toolbox::FlattenUri(uri); |
256 output.SendMethodNotAllowedError(GetAcceptedMethods(uri)); | 256 output.SendMethodNotAllowedError(GetAcceptedMethods(uri)); |
257 } | 257 } |
258 | |
259 return true; | |
258 } | 260 } |
259 | 261 |
260 void RestApi::Register(const std::string& path, | 262 void RestApi::Register(const std::string& path, |
261 GetHandler handler) | 263 GetHandler handler) |
262 { | 264 { |