From 01c72d44e8a7aab6268aa523f365e7fb8147989c Mon Sep 17 00:00:00 2001 From: JalonSolov Date: Wed, 26 Jan 2022 10:13:10 -0500 Subject: [PATCH] net.http: add allow_redirect to FetchConfig (#13285) --- vlib/net/http/http.v | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlib/net/http/http.v b/vlib/net/http/http.v index 05b1057472..aac5897ec4 100644 --- a/vlib/net/http/http.v +++ b/vlib/net/http/http.v @@ -28,6 +28,7 @@ pub mut: cert string // the path to a cert.pem file, containing client certificate(s) for the request cert_key string // the path to a key.pem file, containing private keys for the client certificate(s) in_memory_verification bool // if true, verify, cert, and cert_key are read from memory, not from a file + allow_redirect bool = true // whether to allow redirect } pub fn new_request(method Method, url_ string, data string) ?Request { @@ -151,6 +152,7 @@ pub fn fetch(config FetchConfig) ?Response { cert: config.cert cert_key: config.cert_key in_memory_verification: config.in_memory_verification + allow_redirect: config.allow_redirect } res := req.do() ? return res