mrtazz/restclient-cpp

RestClient::Response reassignment is null

jmdaemon opened this issue · 0 comments

Example Code

// Setup
std::string url = ""; // your url here
std::string query = "/get"; // your endpoint
RestClient::Connection* con = new RestClient::Connection(url);

// Testing
RestClient::Response res = new RestClient::Response();
res = con->get(query); // This reassignment does not work, res is still null
std::cout << res.body << std::endl; // Nothing

auto actual = con->get(query); // This works
std::cout << actual.body << std::endl;

Expected Behavior

This reassignment should "just work" as intended.