Jason Law

Make withCredentials configurable

... ... @@ -46,9 +46,11 @@ class GetHttpClient {
bool allowAutoSignedCert = false,
this.baseUrl,
List<TrustedCertificate>? trustedCertificates,
bool withCredentials = false,
}) : _httpClient = HttpRequestImpl(
allowAutoSignedCert: allowAutoSignedCert,
trustedCertificates: trustedCertificates,
withCredentials: withCredentials,
),
_modifier = GetModifier();
... ...
... ... @@ -13,6 +13,7 @@ class HttpRequestImpl implements HttpRequestBase {
HttpRequestImpl({
bool allowAutoSignedCert = true,
List<TrustedCertificate>? trustedCertificates,
this.withCredentials = false,
});
/// The currently active XHRs.
... ... @@ -20,7 +21,7 @@ class HttpRequestImpl implements HttpRequestBase {
///This option requires that you submit credentials for requests
///on different sites. The default is false
bool withCredentials = false;
final bool withCredentials;
/// Sends an HTTP request and asynchronously returns the response.
@override
... ...
... ... @@ -16,6 +16,7 @@ class HttpRequestImpl extends HttpRequestBase {
HttpRequestImpl({
bool allowAutoSignedCert = true,
List<TrustedCertificate>? trustedCertificates,
bool withCredentials = false,
}) {
_httpClient = io.HttpClient();
if (trustedCertificates != null) {
... ...
... ... @@ -7,6 +7,7 @@ class HttpRequestImpl extends HttpRequestBase {
HttpRequestImpl({
bool allowAutoSignedCert = true,
List<TrustedCertificate>? trustedCertificates,
bool withCredentials = false,
});
@override
void close() {}
... ...