Hi there and thanks for this lib!
I got a question regarding the following scenario:
Imagine I am wrapping the client in another class which does a request.
Before the request finishes, the wrapping object gets destroyed which results in a segfault.
So, I need to cancel the request before destroying the object. How would I do that?
Thanks a lot in advance!
class SomeClass {
public:
~SomeClass() {
// what to do here?
};
void request() {
http::request req2;
req2.url = "http://example.com/";
client.fetch(req2, [](const std::string& body, int error) {
printf("%s\n", body.c_str());
}
);
}
http::client client;
};
Hi there and thanks for this lib!
I got a question regarding the following scenario:
Imagine I am wrapping the client in another class which does a request.
Before the request finishes, the wrapping object gets destroyed which results in a segfault.
So, I need to cancel the request before destroying the object. How would I do that?
Thanks a lot in advance!