Changed http to https output in https_examples.cpp
This commit is contained in:
parent
88569844ea
commit
632ee8d88c
1 changed files with 3 additions and 3 deletions
|
|
@ -222,12 +222,12 @@ int main() {
|
||||||
{
|
{
|
||||||
HttpsClient client("localhost:8080", false);
|
HttpsClient client("localhost:8080", false);
|
||||||
try {
|
try {
|
||||||
cout << "Example GET request to http://localhost:8080/match/123" << endl;
|
cout << "Example GET request to https://localhost:8080/match/123" << endl;
|
||||||
auto r1 = client.request("GET", "/match/123");
|
auto r1 = client.request("GET", "/match/123");
|
||||||
cout << "Response content: " << r1->content.rdbuf() << endl // Alternatively, use the convenience function r1->content.string()
|
cout << "Response content: " << r1->content.rdbuf() << endl // Alternatively, use the convenience function r1->content.string()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
cout << "Example POST request to http://localhost:8080/string" << endl;
|
cout << "Example POST request to https://localhost:8080/string" << endl;
|
||||||
auto r2 = client.request("POST", "/string", json_string);
|
auto r2 = client.request("POST", "/string", json_string);
|
||||||
cout << "Response content: " << r2->content.rdbuf() << endl
|
cout << "Response content: " << r2->content.rdbuf() << endl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
@ -240,7 +240,7 @@ int main() {
|
||||||
// Asynchronous request example
|
// Asynchronous request example
|
||||||
{
|
{
|
||||||
HttpsClient client("localhost:8080", false);
|
HttpsClient client("localhost:8080", false);
|
||||||
cout << "Example POST request to http://localhost:8080/json" << endl;
|
cout << "Example POST request to https://localhost:8080/json" << endl;
|
||||||
client.request("POST", "/json", json_string, [](shared_ptr<HttpsClient::Response> response, const SimpleWeb::error_code &ec) {
|
client.request("POST", "/json", json_string, [](shared_ptr<HttpsClient::Response> response, const SimpleWeb::error_code &ec) {
|
||||||
if(!ec)
|
if(!ec)
|
||||||
cout << "Response content: " << response->content.rdbuf() << endl;
|
cout << "Response content: " << response->content.rdbuf() << endl;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue