Fork for poking around in the original "client implementation for p≡p update server".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
downloadclient/test_https.cc

33 lines
653 B

// this file is under GNU General Public License 3.0
// see LICENSE.txt
#include <iostream>
#include <assert.h>
#include "HTTPSStream.hh"
using namespace std;
using namespace pEp;
int main()
{
HTTPSDevice https;
https.open("https://pep.foundation");
https.get("/");
for (auto f=https.header().begin(); f != https.header().end(); ++f) {
cout << f->name_string() << ": " << f->value() << "\n";
}
https.close();
HTTPSStream httpss { HTTPSDevice { "https://pep.foundation" }, std::ios::binary };
httpss->get("/");
std::stringstream str;
str << httpss.rdbuf();
cout << str.str();
return 0;
}