# HG changeset patch # User Sebastien Jodogne # Date 1560527556 -7200 # Node ID 00737cd21f4086006a8d4682a72d7b4c0251e7ae # Parent 2f6dcb9c8cc1f70ab11d012b79c8887179528aa3 OrthancPlugins::HttpClient::AddHeaders() diff -r 2f6dcb9c8cc1 -r 00737cd21f40 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp --- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Fri Jun 14 15:21:19 2019 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Fri Jun 14 17:52:36 2019 +0200 @@ -2222,6 +2222,16 @@ { } + + void HttpClient::AddHeaders(const HttpHeaders& headers) + { + for (HttpHeaders::const_iterator it = headers.begin(); + it != headers.end(); ++it) + { + headers_[it->first] = it->second; + } + } + void HttpClient::SetCredentials(const std::string& username, const std::string& password) diff -r 2f6dcb9c8cc1 -r 00737cd21f40 Plugins/Samples/Common/OrthancPluginCppWrapper.h --- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h Fri Jun 14 15:21:19 2019 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h Fri Jun 14 17:52:36 2019 +0200 @@ -889,6 +889,8 @@ headers_[key] = value; } + void AddHeaders(const HttpHeaders& headers); + void SetCredentials(const std::string& username, const std::string& password);