changeset 3892:fe0e4ef52a72

Fix missing body in "OrthancPluginHttpPost()" and "OrthancPluginHttpPut()"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 May 2020 08:40:48 +0200
parents 35065dd39cc8
children 32e95d28efb2 6e14f2da7c7e
files NEWS Plugins/Engine/OrthancPlugins.cpp
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue May 05 18:08:36 2020 +0200
+++ b/NEWS	Wed May 06 08:40:48 2020 +0200
@@ -11,6 +11,7 @@
 Maintenance
 -----------
 
+* Fix missing body in "OrthancPluginHttpPost()" and "OrthancPluginHttpPut()"
 * Upgraded dependencies for static builds (notably on Windows and LSB):
   - openssl 1.1.1g
 
--- a/Plugins/Engine/OrthancPlugins.cpp	Tue May 05 18:08:36 2020 +0200
+++ b/Plugins/Engine/OrthancPlugins.cpp	Wed May 06 08:40:48 2020 +0200
@@ -2732,10 +2732,12 @@
 
       case OrthancPluginHttpMethod_Post:
         client.SetMethod(HttpMethod_Post);
+        client.GetBody().assign(reinterpret_cast<const char*>(parameters.body), parameters.bodySize);
         break;
 
       case OrthancPluginHttpMethod_Put:
         client.SetMethod(HttpMethod_Put);
+        client.GetBody().assign(reinterpret_cast<const char*>(parameters.body), parameters.bodySize);
         break;
 
       case OrthancPluginHttpMethod_Delete: