Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi.cpp @ 207:7f74209ea0f8
RestApi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Nov 2012 16:23:11 +0100 |
parents | 7f4acf490179 |
children | de640de989b8 |
comparison
equal
deleted
inserted
replaced
206:4453a010d0db | 207:7f74209ea0f8 |
---|---|
395 void OrthancRestApi::Handle( | 395 void OrthancRestApi::Handle( |
396 HttpOutput& output, | 396 HttpOutput& output, |
397 const std::string& method, | 397 const std::string& method, |
398 const UriComponents& uri, | 398 const UriComponents& uri, |
399 const Arguments& headers, | 399 const Arguments& headers, |
400 const Arguments& arguments, | 400 const Arguments& getArguments, |
401 const std::string& postData) | 401 const std::string& postData) |
402 { | 402 { |
403 if (uri.size() == 0) | 403 if (uri.size() == 0) |
404 { | 404 { |
405 if (method == "GET") | 405 if (method == "GET") |
716 { | 716 { |
717 if (method == "GET") | 717 if (method == "GET") |
718 { | 718 { |
719 const static unsigned int MAX_RESULTS = 100; | 719 const static unsigned int MAX_RESULTS = 100; |
720 | 720 |
721 //std::string filter = GetArgument(arguments, "filter", ""); | 721 //std::string filter = GetArgument(getArguments, "filter", ""); |
722 int64_t since; | 722 int64_t since; |
723 unsigned int limit; | 723 unsigned int limit; |
724 try | 724 try |
725 { | 725 { |
726 since = boost::lexical_cast<int64_t>(GetArgument(arguments, "since", "0")); | 726 since = boost::lexical_cast<int64_t>(GetArgument(getArguments, "since", "0")); |
727 limit = boost::lexical_cast<unsigned int>(GetArgument(arguments, "limit", "0")); | 727 limit = boost::lexical_cast<unsigned int>(GetArgument(getArguments, "limit", "0")); |
728 } | 728 } |
729 catch (boost::bad_lexical_cast) | 729 catch (boost::bad_lexical_cast) |
730 { | 730 { |
731 output.SendHeader(Orthanc_HttpStatus_400_BadRequest); | 731 output.SendHeader(Orthanc_HttpStatus_400_BadRequest); |
732 return; | 732 return; |