diff OrthancStone/Sources/Loaders/DicomSource.cpp @ 1761:28755e42c007

Fix issue #197 (Support for passing credentials with all HTTP requests)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 10 May 2021 11:51:53 +0200
parents 9ac2a65d4172
children ca85b6d60bca
line wrap: on
line diff
--- a/OrthancStone/Sources/Loaders/DicomSource.cpp	Tue May 04 11:02:24 2021 +0200
+++ b/OrthancStone/Sources/Loaders/DicomSource.cpp	Mon May 10 11:51:53 2021 +0200
@@ -395,4 +395,20 @@
       throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
     }
   }
+
+
+  void DicomSource::AddHttpHeader(const std::string& header,
+                                  const std::string& value)
+  {
+    if (type_ == DicomSourceType_Orthanc ||
+        type_ == DicomSourceType_DicomWeb ||
+        type_ == DicomSourceType_DicomWebThroughOrthanc)
+    {
+      webService_.AddHttpHeader(header, value);
+    }
+    else
+    {
+      throw Orthanc::OrthancException(Orthanc::ErrorCode_BadParameterType);
+    }
+  }
 }