mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
add HttpRequestOptions.dontFollowRedirects (#3473)
This implements the option to have http.request() not follow server's 3xx redirection replies but instead return the exact redirection code and headers. * on iOS, it uses a different NSURLSession instance for non-following request, with a NSURLSessionTaskDelegate implementing URLSessinTaskWillPerformHTTPRedirection... * on Android, it just passes the option on to org.nativescript.widgets.Async.Http; so this requires the respective commit in tns-core-modules-widgets to work
This commit is contained in:
committed by
Vladimir Enchev
parent
4f3f09e9ae
commit
ee4b790728
5
tns-core-modules/http/http.d.ts
vendored
5
tns-core-modules/http/http.d.ts
vendored
@@ -89,6 +89,11 @@ declare module "http" {
|
||||
* Gets or sets the request timeout in milliseconds.
|
||||
*/
|
||||
timeout?: number;
|
||||
|
||||
/**
|
||||
* Gets or sets wether to *not* follow server's redirection responses.
|
||||
*/
|
||||
dontFollowRedirects?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user