Mercurial > hg > orthanc
comparison OrthancServer/Scheduler/StorePeerCommand.cpp @ 2020:a0bd8cd55da7
reorganization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 15 Jun 2016 17:19:10 +0200 |
parents | 9c9332e486ca |
children | 2b1520efa282 |
comparison
equal
deleted
inserted
replaced
2019:9c9332e486ca | 2020:a0bd8cd55da7 |
---|---|
37 #include "../../Core/HttpClient.h" | 37 #include "../../Core/HttpClient.h" |
38 | 38 |
39 namespace Orthanc | 39 namespace Orthanc |
40 { | 40 { |
41 StorePeerCommand::StorePeerCommand(ServerContext& context, | 41 StorePeerCommand::StorePeerCommand(ServerContext& context, |
42 const OrthancPeerParameters& peer, | 42 const WebServiceParameters& peer, |
43 bool ignoreExceptions) : | 43 bool ignoreExceptions) : |
44 context_(context), | 44 context_(context), |
45 peer_(peer), | 45 peer_(peer), |
46 ignoreExceptions_(ignoreExceptions) | 46 ignoreExceptions_(ignoreExceptions) |
47 { | 47 { |
49 | 49 |
50 bool StorePeerCommand::Apply(ListOfStrings& outputs, | 50 bool StorePeerCommand::Apply(ListOfStrings& outputs, |
51 const ListOfStrings& inputs) | 51 const ListOfStrings& inputs) |
52 { | 52 { |
53 // Configure the HTTP client | 53 // Configure the HTTP client |
54 HttpClient client; | 54 HttpClient client(peer_, "instances"); |
55 peer_.ConfigureClient(client); | |
56 | |
57 client.SetUrl(peer_.GetUrl() + "instances"); | |
58 client.SetMethod(HttpMethod_Post); | 55 client.SetMethod(HttpMethod_Post); |
59 | 56 |
60 for (ListOfStrings::const_iterator | 57 for (ListOfStrings::const_iterator |
61 it = inputs.begin(); it != inputs.end(); ++it) | 58 it = inputs.begin(); it != inputs.end(); ++it) |
62 { | 59 { |