Closed budziam closed 5 years ago
Hi, I'm trying to use this library in my project, but unfortunately I stucked.
I would like to have access to response body in requestComplete callback without using global variables.
requestComplete
My code looks like this:
new CURL: handle = curl_easy_init(); curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, "@responseWrite"); curl_easy_perform(handle, "@requestComplete"); @responseWrite(const data[], const size, const nmemb) { return size * nmemb; } @requestComplete(CURL: curl, CURLcode: code) { // TODO: Have access to data from responseWrite }
Can you help me with implementation?
Hi! This module does not have such functionality, for now. You can try to use gRIP
Thank you for your response. I ended up with a global responses pool.
Hi, I'm trying to use this library in my project, but unfortunately I stucked.
I would like to have access to response body in
requestComplete
callback without using global variables.My code looks like this:
Can you help me with implementation?