Lasso Soft Inc. > Home

[ curl->asString ]

Method

[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.

  • Syntax
curl->asstring
Examples
  • Beginner

To obtain the doctype for a HTTP URL

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">

Recent Comments

No Comments found

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. > Home

 

 

©LassoSoft Inc 2014 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft