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.
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|