Lasso Soft Inc. > Home

[ curlopt_failonerror ]

Method

[curlopt_failonerror] is used together with [curl->set]. The parameter expected by [curl->set] is an integer.

A value of 1 means that curl should fail silently if the HTTP status code is equal to or larger than 400. The default action would be to return the page normally, ignoring that code.

This method is not fail-safe, and there are scenarios where non-successful response codes will slip through. For more information see the documentation of libcurl (http://curl.haxx.se/).

  • Syntax
curl->set(curlopt_failonerror, 1)
Examples
  • Beginner

To set the curlopt_failonerror option

Code

local(c = curl('www.example.com/login'))
#c->set(curlopt_failonerror, 1)
#c->result

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 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft