mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net.http: add allow_redirect to FetchConfig (#13285)
This commit is contained in:
parent
2d184559b6
commit
01c72d44e8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user