Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestApi.cpp @ 3401:962e5f00744b
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Jun 2019 14:58:27 +0200 |
parents | e44e0127e553 |
children | 22bdb9c91ebf |
comparison
equal
deleted
inserted
replaced
3400:0faae6f6e3c5 | 3401:962e5f00744b |
---|---|
116 } | 116 } |
117 | 117 |
118 LOG(INFO) << "Receiving a DICOM file of " << call.GetBodySize() << " bytes through HTTP"; | 118 LOG(INFO) << "Receiving a DICOM file of " << call.GetBodySize() << " bytes through HTTP"; |
119 | 119 |
120 // TODO Remove unneccessary memcpy | 120 // TODO Remove unneccessary memcpy |
121 std::string postData(call.GetBodyData(), call.GetBodySize()); | 121 std::string postData; |
122 call.BodyToString(postData); | |
122 | 123 |
123 DicomInstanceToStore toStore; | 124 DicomInstanceToStore toStore; |
124 toStore.SetOrigin(DicomInstanceOrigin::FromRest(call)); | 125 toStore.SetOrigin(DicomInstanceOrigin::FromRest(call)); |
125 toStore.SetBuffer(postData); | 126 toStore.SetBuffer(postData); |
126 | 127 |
166 const char* username, | 167 const char* username, |
167 HttpMethod method, | 168 HttpMethod method, |
168 const UriComponents& uri, | 169 const UriComponents& uri, |
169 const Arguments& headers, | 170 const Arguments& headers, |
170 const GetArguments& getArguments, | 171 const GetArguments& getArguments, |
171 const char* bodyData, | 172 const void* bodyData, |
172 size_t bodySize) | 173 size_t bodySize) |
173 { | 174 { |
174 MetricsRegistry::Timer timer(context_.GetMetricsRegistry(), "orthanc_rest_api_duration_ms"); | 175 MetricsRegistry::Timer timer(context_.GetMetricsRegistry(), "orthanc_rest_api_duration_ms"); |
175 MetricsRegistry::ActiveCounter counter(activeRequests_); | 176 MetricsRegistry::ActiveCounter counter(activeRequests_); |
176 | 177 |