From 2fc3dc2a69b23928d7172c6dad488e6060ad7331 Mon Sep 17 00:00:00 2001 From: Marc Zych Date: Thu, 7 Apr 2016 10:39:13 -0700 Subject: [PATCH] README: Update Advanced Example This fixes 2 problems that I encountered with the example: 1. You need to include `connection.h`. 1. You need a pointer type to handle the `new RestClient...`. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 99c84fd2..bffc4261 100644 --- a/README.md +++ b/README.md @@ -43,13 +43,14 @@ However if you want more sophisticated features like connection reuse, timeouts or authentication, there is also a different, more configurable way. ```cpp +#include "restclient-cpp/connection.h" #include "restclient-cpp/restclient.h" // initialize RestClient RestClient::init(); // get a connection object -RestClient::Connection conn = new RestClient::Connection("http://url.com"); +RestClient::Connection conn* = new RestClient::Connection("http://url.com"); // configure basic auth conn->SetBasicAuth("WarMachine68", "WARMACHINEROX");