Used with [curl->set]. A value of 1 means that curl should follow any Location: header that the server sends as a part of an HTTP header.
This means that the library will re-send the same request on the new location and follow new Location: headers all the way until no more such headers are returned. [curlopt_maxredirs] can be used to limit the number of redirects curl will follow.
It is possible to limit what protocols to follow using [curlopt_redir_protocols].
For more information see respective method.
curl->set(CURLOPT_FOLLOWLOCATION,1)
The number of cascading redirects that curl will follow are set to 10.
Code
local(c = curl('www.example.com/login'))
#c->set(curlopt_followlocation, 1)
#c->set(curlopt_maxredirs, 10)
#c->result
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