comparison Core/HttpClient.cpp @ 2787:ad2c32082653

Fix OrthancPluginHttpClient() to return the HTTP status on errors
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 26 Jul 2018 10:33:36 +0200
parents 0196d07a900f
children 959bd8857eb5
comparison
equal deleted inserted replaced
2786:e7a10626645f 2787:ad2c32082653
182 struct curl_slist *defaultPostHeaders_; 182 struct curl_slist *defaultPostHeaders_;
183 struct curl_slist *userHeaders_; 183 struct curl_slist *userHeaders_;
184 }; 184 };
185 185
186 186
187 static void ThrowException(HttpStatus status) 187 void HttpClient::ThrowException(HttpStatus status)
188 { 188 {
189 switch (status) 189 switch (status)
190 { 190 {
191 case HttpStatus_400_BadRequest: 191 case HttpStatus_400_BadRequest:
192 throw OrthancException(ErrorCode_BadRequest); 192 throw OrthancException(ErrorCode_BadRequest);