[curl_easy_getinfo] extracts information from a [curltoken].
curl_easy_getinfo('curltoken', 'curlinfo option')
Code
local(ctoken, err, data, headerBytes = bytes, bodyBytes = bytes, ready = false)
#ctoken = curl_easy_init
#err = curl_easy_setopt(#ctoken, curlopt_url, "http://www.lassosoft.com/")
while(!#ready) => {
#data = curl_multi_perform(#ctoken)
#data->second->isa(::bytes) ? #headerBytes->append(#data->second)
#data->last->isa(::bytes) ? #bodyBytes->append(#data->last)
#ready = !#data->first
!#ready ? sleep(10)
}
//#headerBytes contains the http headers returned
//#bodyBytes contains the data returned from the request
curl_easy_getinfo(#ctoken, curlinfo_response_code)
Result
200
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments