comparison OrthancServer/Scheduler/StorePeerCommand.cpp @ 2019:9c9332e486ca

HTTPS client certificates can be associated with Orthanc peers to enhance security over Internet
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 14 Jun 2016 17:53:23 +0200
parents ce90d109bb64
children a0bd8cd55da7
comparison
equal deleted inserted replaced
2018:300599489cab 2019:9c9332e486ca
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;
55 if (peer_.GetUsername().size() != 0 && 55 peer_.ConfigureClient(client);
56 peer_.GetPassword().size() != 0)
57 {
58 client.SetCredentials(peer_.GetUsername().c_str(),
59 peer_.GetPassword().c_str());
60 }
61 56
62 client.SetUrl(peer_.GetUrl() + "instances"); 57 client.SetUrl(peer_.GetUrl() + "instances");
63 client.SetMethod(HttpMethod_Post); 58 client.SetMethod(HttpMethod_Post);
64 59
65 for (ListOfStrings::const_iterator 60 for (ListOfStrings::const_iterator