Skip to content

Commit

Permalink
Update marc_api.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
rusdevops authored Nov 22, 2017
1 parent 8b6d0ed commit d8bba19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sources/marc_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ MarcRestClient::MarcRestClient()
{
cookieStore.set_file(""); // init cookie engine
restClient->reset(); // reset debug->std:cout function
restClient->add<CURLOPT_SSL_VERIFYPEER>(0);
restClient->add<CURLOPT_SSL_VERIFYHOST>(0);
restClient->add<CURLOPT_CAINFO>("cacrt.pem");
}


Expand Down Expand Up @@ -127,6 +124,8 @@ string MarcRestClient::performPost()
restClient->add<CURLOPT_HTTPHEADER>(header.get());
restClient->add<CURLOPT_FOLLOWLOCATION>(1L);
restClient->add<CURLOPT_USERAGENT>(SAFE_USER_AGENT.data()); // 403 without this
restClient->add<CURLOPT_SSL_VERIFYPEER>(0);
restClient->add<CURLOPT_SSL_VERIFYHOST>(0);
restClient->add<CURLOPT_VERBOSE>(verbose);
restClient->add<CURLOPT_DEBUGFUNCTION>(trace_post);

Expand Down Expand Up @@ -161,6 +160,8 @@ void MarcRestClient::performGet(Container &target)
restClient->add<CURLOPT_VERBOSE>(verbose);
restClient->add<CURLOPT_FOLLOWLOCATION>(1L);
restClient->add<CURLOPT_DEBUGFUNCTION>(trace_post);
restClient->add<CURLOPT_SSL_VERIFYPEER>(0);
restClient->add<CURLOPT_SSL_VERIFYHOST>(0);
restClient->add<CURLOPT_WRITEDATA>(&target);
restClient->add<CURLOPT_WRITEFUNCTION>([](void *contents, size_t size, size_t nmemb, void *userp) {
auto result = static_cast<Container *>(userp);
Expand Down

0 comments on commit d8bba19

Please sign in to comment.