Mercurial > hg > orthanc
comparison Plugins/Engine/OrthancPlugins.cpp @ 3401:962e5f00744b
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Jun 2019 14:58:27 +0200 |
parents | 4e8205871967 |
children | e280ced38a4c |
comparison
equal
deleted
inserted
replaced
3400:0faae6f6e3c5 | 3401:962e5f00744b |
---|---|
1289 const char* /*username*/, | 1289 const char* /*username*/, |
1290 HttpMethod method, | 1290 HttpMethod method, |
1291 const UriComponents& uri, | 1291 const UriComponents& uri, |
1292 const Arguments& headers, | 1292 const Arguments& headers, |
1293 const GetArguments& getArguments, | 1293 const GetArguments& getArguments, |
1294 const char* bodyData, | 1294 const void* bodyData, |
1295 size_t bodySize) | 1295 size_t bodySize) |
1296 { | 1296 { |
1297 RestCallbackMatcher matcher(uri); | 1297 RestCallbackMatcher matcher(uri); |
1298 | 1298 |
1299 PImpl::RestCallback* callback = NULL; | 1299 PImpl::RestCallback* callback = NULL; |
2385 HttpClient client; | 2385 HttpClient client; |
2386 | 2386 |
2387 if (p.method == OrthancPluginHttpMethod_Post || | 2387 if (p.method == OrthancPluginHttpMethod_Post || |
2388 p.method == OrthancPluginHttpMethod_Put) | 2388 p.method == OrthancPluginHttpMethod_Put) |
2389 { | 2389 { |
2390 client.GetBody().assign(p.body, p.bodySize); | 2390 client.GetBody().assign(reinterpret_cast<const char*>(p.body), p.bodySize); |
2391 } | 2391 } |
2392 | 2392 |
2393 SetupHttpClient(client, p); | 2393 SetupHttpClient(client, p); |
2394 ExecuteHttpClientWithoutStream(*p.httpStatus, p.answerBody, p.answerHeaders, client); | 2394 ExecuteHttpClientWithoutStream(*p.httpStatus, p.answerBody, p.answerHeaders, client); |
2395 } | 2395 } |
2478 client.SetMethod(HttpMethod_Get); | 2478 client.SetMethod(HttpMethod_Get); |
2479 break; | 2479 break; |
2480 | 2480 |
2481 case OrthancPluginHttpMethod_Post: | 2481 case OrthancPluginHttpMethod_Post: |
2482 client.SetMethod(HttpMethod_Post); | 2482 client.SetMethod(HttpMethod_Post); |
2483 client.GetBody().assign(p.body, p.bodySize); | 2483 client.GetBody().assign(reinterpret_cast<const char*>(p.body), p.bodySize); |
2484 break; | 2484 break; |
2485 | 2485 |
2486 case OrthancPluginHttpMethod_Put: | 2486 case OrthancPluginHttpMethod_Put: |
2487 client.SetMethod(HttpMethod_Put); | 2487 client.SetMethod(HttpMethod_Put); |
2488 client.GetBody().assign(p.body, p.bodySize); | 2488 client.GetBody().assign(reinterpret_cast<const char*>(p.body), p.bodySize); |
2489 break; | 2489 break; |
2490 | 2490 |
2491 case OrthancPluginHttpMethod_Delete: | 2491 case OrthancPluginHttpMethod_Delete: |
2492 client.SetMethod(HttpMethod_Delete); | 2492 client.SetMethod(HttpMethod_Delete); |
2493 break; | 2493 break; |