Skip to content
Snippets Groups Projects
Commit daf1ced8 authored by Шипицын Анатолий's avatar Шипицын Анатолий Committed by Kirill Yukhin
Browse files

httpc: allow to don't auto-follow redirects

While we are here also added forgotten option descriptions to httpc.lua.

@TarantoolBot document
Title: httpc: new 'follow_location' option

When the option is set to `true` (which is default) and a response has
3xx code the http client will automatically issue another request to a
location that a server sends in 'Location' header. If the new response
is 3xx again, the http.client will issue a next request and so on in a
loop until a non-3xx response will be received. This last response will
be returned as a result.

Setting this option to `false` allows to disable this behaviour. In this
case the http client will return a 3xx response itself.

See https://curl.haxx.se/libcurl/c/CURLOPT_FOLLOWLOCATION.html
parent 5ebf9338
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment