Mercurial > hg > orthanc-stone
diff Platforms/Generic/WebServicePostCommand.cpp @ 257:9afafb192180 am-2
using PAM
author | am@osimis.io |
---|---|
date | Tue, 10 Jul 2018 12:39:01 +0200 |
parents | 192e6e349e69 |
children | 46c5296d867e |
line wrap: on
line diff
--- a/Platforms/Generic/WebServicePostCommand.cpp Tue Jul 03 13:19:56 2018 +0200 +++ b/Platforms/Generic/WebServicePostCommand.cpp Tue Jul 10 12:39:01 2018 +0200 @@ -29,9 +29,10 @@ IWebService::ICallback& callback, const Orthanc::WebServiceParameters& parameters, const std::string& uri, + const IWebService::Headers& headers, const std::string& body, Orthanc::IDynamicObject* payload /* takes ownership */) : - WebServiceCommandBase(broker, callback, parameters, uri, payload), + WebServiceCommandBase(broker, callback, parameters, uri, headers, payload), body_(body) { } @@ -42,6 +43,12 @@ client.SetTimeout(60); client.SetMethod(Orthanc::HttpMethod_Post); client.GetBody().swap(body_); + + for (IWebService::Headers::const_iterator it = headers_.begin(); it != headers_.end(); it++ ) + { + client.AddHeader(it->first, it->second); + } + success_ = client.Apply(answer_); }