Function get

Synopsis

#include <include/restclient-cpp/restclient.h>

Response get(const std::string &url)

Description

HTTP GET method.

public methods for the simple API. These don't allow a lot of configuration but are meant for simple HTTP calls.

Parameters

url - to query

Returns
response struct

Mentioned in

Source

Lines 51-62 in source/restclient.cc. Line 52 in include/restclient-cpp/restclient.h.

RestClient::Response RestClient::get(const std::string& url) {
#if __cplusplus >= 201402L
  auto conn = std::make_unique<RestClient::Connection>("");
  return conn->get(url);
#else
  RestClient::Response ret;
  RestClient::Connection *conn = new RestClient::Connection("");
  ret = conn->get(url);
  delete conn;
  return ret;
#endif
}





Add Discussion as Guest

Log in