You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As read in the documentation, it should be possible to create an object (lets say a pointer to an object) of the class connection. For getting that, it is supposed that should be coded the next sencence:
-RestClient::Connection* conn = new RestClient::Connection("http://url.com");
Actual behaviour
When I am trying to build the following program, I get the error in the title of this issue.
RestClient::Response r = RestClient::get("www.google.es");
std::cout << r.code;
RestClient::init();
RestClient::Connection* conn = new RestClient::Connection("www.google.es");
return 0;
}
Environment and debugging details
Eclipse
g++ 4.8.4
Ubuntu trusty
undefined reference to RestClient::Connection::Connection(std::string const&)
The problem is that there is no problem using the RestClient::get method, but however I cannot build any object of the RestClient::Connection class, so I cannot do the request I want.
The request I want to do needs to have a kind of special header, so I cannot do a normal get request to a single url.
Anybody know how could I fix it? I read it in the documentation and I have tried to check in the test, in order to follow the way it is done there, but is not running neither. I have included the path for the headers and added the library -l restclient-cpp, but I am wondering if the fail could be there, and it is not foud because of there is a different library wich contains it.
The text was updated successfully, but these errors were encountered:
As the header files are in the restclient-cpp subdirectory. I'm also not sure why RestClient::get works in that setup. So any details about your build workflow would be helpful.
Hello everybody!
Expected behaviour
As read in the documentation, it should be possible to create an object (lets say a pointer to an object) of the class connection. For getting that, it is supposed that should be coded the next sencence:
-RestClient::Connection* conn = new RestClient::Connection("http://url.com");
Actual behaviour
When I am trying to build the following program, I get the error in the title of this issue.
#include
#include "connection.h"
#include "restclient.h"
int main(){
RestClient::Response r = RestClient::get("www.google.es");
std::cout << r.code;
RestClient::init();
RestClient::Connection* conn = new RestClient::Connection("www.google.es");
return 0;
}
Environment and debugging details
Eclipse
The problem is that there is no problem using the RestClient::get method, but however I cannot build any object of the RestClient::Connection class, so I cannot do the request I want.
The request I want to do needs to have a kind of special header, so I cannot do a normal get request to a single url.
Anybody know how could I fix it? I read it in the documentation and I have tried to check in the test, in order to follow the way it is done there, but is not running neither. I have included the path for the headers and added the library -l restclient-cpp, but I am wondering if the fail could be there, and it is not foud because of there is a different library wich contains it.
The text was updated successfully, but these errors were encountered: