Showing
4 changed files
with
6 additions
and
1 deletions
@@ -46,9 +46,11 @@ class GetHttpClient { | @@ -46,9 +46,11 @@ class GetHttpClient { | ||
46 | bool allowAutoSignedCert = false, | 46 | bool allowAutoSignedCert = false, |
47 | this.baseUrl, | 47 | this.baseUrl, |
48 | List<TrustedCertificate>? trustedCertificates, | 48 | List<TrustedCertificate>? trustedCertificates, |
49 | + bool withCredentials = false, | ||
49 | }) : _httpClient = HttpRequestImpl( | 50 | }) : _httpClient = HttpRequestImpl( |
50 | allowAutoSignedCert: allowAutoSignedCert, | 51 | allowAutoSignedCert: allowAutoSignedCert, |
51 | trustedCertificates: trustedCertificates, | 52 | trustedCertificates: trustedCertificates, |
53 | + withCredentials: withCredentials, | ||
52 | ), | 54 | ), |
53 | _modifier = GetModifier(); | 55 | _modifier = GetModifier(); |
54 | 56 |
@@ -13,6 +13,7 @@ class HttpRequestImpl implements HttpRequestBase { | @@ -13,6 +13,7 @@ class HttpRequestImpl implements HttpRequestBase { | ||
13 | HttpRequestImpl({ | 13 | HttpRequestImpl({ |
14 | bool allowAutoSignedCert = true, | 14 | bool allowAutoSignedCert = true, |
15 | List<TrustedCertificate>? trustedCertificates, | 15 | List<TrustedCertificate>? trustedCertificates, |
16 | + this.withCredentials = false, | ||
16 | }); | 17 | }); |
17 | 18 | ||
18 | /// The currently active XHRs. | 19 | /// The currently active XHRs. |
@@ -20,7 +21,7 @@ class HttpRequestImpl implements HttpRequestBase { | @@ -20,7 +21,7 @@ class HttpRequestImpl implements HttpRequestBase { | ||
20 | 21 | ||
21 | ///This option requires that you submit credentials for requests | 22 | ///This option requires that you submit credentials for requests |
22 | ///on different sites. The default is false | 23 | ///on different sites. The default is false |
23 | - bool withCredentials = false; | 24 | + final bool withCredentials; |
24 | 25 | ||
25 | /// Sends an HTTP request and asynchronously returns the response. | 26 | /// Sends an HTTP request and asynchronously returns the response. |
26 | @override | 27 | @override |
@@ -16,6 +16,7 @@ class HttpRequestImpl extends HttpRequestBase { | @@ -16,6 +16,7 @@ class HttpRequestImpl extends HttpRequestBase { | ||
16 | HttpRequestImpl({ | 16 | HttpRequestImpl({ |
17 | bool allowAutoSignedCert = true, | 17 | bool allowAutoSignedCert = true, |
18 | List<TrustedCertificate>? trustedCertificates, | 18 | List<TrustedCertificate>? trustedCertificates, |
19 | + bool withCredentials = false, | ||
19 | }) { | 20 | }) { |
20 | _httpClient = io.HttpClient(); | 21 | _httpClient = io.HttpClient(); |
21 | if (trustedCertificates != null) { | 22 | if (trustedCertificates != null) { |
@@ -7,6 +7,7 @@ class HttpRequestImpl extends HttpRequestBase { | @@ -7,6 +7,7 @@ class HttpRequestImpl extends HttpRequestBase { | ||
7 | HttpRequestImpl({ | 7 | HttpRequestImpl({ |
8 | bool allowAutoSignedCert = true, | 8 | bool allowAutoSignedCert = true, |
9 | List<TrustedCertificate>? trustedCertificates, | 9 | List<TrustedCertificate>? trustedCertificates, |
10 | + bool withCredentials = false, | ||
10 | }); | 11 | }); |
11 | @override | 12 | @override |
12 | void close() {} | 13 | void close() {} |
-
Please register or login to post a comment