[curl->asstring] returns the data received for a URL. It differs from [curl->result] in that it returns the result as a string instead of bytes.
curl->asstring
Code
local(c = curl('http://www.lassosoft.com'))
local(doctype = #c->asString->trim&split('\n')->first)
#doctype
Result
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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