#define CPPHTTPLIB_OPENSSL_SUPPORT
#include <httplib.h>
#include <iostream>

int main()
{
  httplib::Client client("http://de.wikipedia.org");
  client.set_follow_location(true);
  httplib::Result result = client.Get("/");
  if (result != nullptr)
  {
    // Server wurde erreicht
    std::cout << result->status << std::endl;
    std::cout << result->reason << std::endl;
    std::cout << result->location << std::endl;
  }
  else
  {
    // Server nicht erreicht
    std::cerr << "Verbindungsfehler" << std::endl;
  }
  return 0;
}
