Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jonny Borges
2021-05-21 15:40:43 -0300
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2021-05-21 15:40:43 -0300
Commit
750c631188599fc71bc0b8f0e45dcdbef209f9b3
750c6311
2 parents
2f999d9c
f2dedd64
Merge pull request #1451 from jasonlaw/master
Make withCredentials configurable
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
1 deletions
lib/get_connect/connect.dart
lib/get_connect/http/src/http.dart
lib/get_connect/http/src/http/html/http_request_html.dart
lib/get_connect/http/src/http/io/http_request_io.dart
lib/get_connect/http/src/http/stub/http_request_stub.dart
lib/get_connect/connect.dart
View file @
750c631
...
...
@@ -97,6 +97,7 @@ class GetConnect extends GetConnectInterface {
this
.
maxRedirects
=
5
,
this
.
maxAuthRetries
=
1
,
this
.
allowAutoSignedCert
=
false
,
this
.
withCredentials
=
false
,
})
{
$configureLifeCycle
();
}
...
...
@@ -113,6 +114,7 @@ class GetConnect extends GetConnectInterface {
List
<
TrustedCertificate
>?
trustedCertificates
;
GetHttpClient
?
_httpClient
;
List
<
GetSocket
>?
_sockets
;
bool
withCredentials
;
@override
List
<
GetSocket
>
get
sockets
=>
_sockets
??=
<
GetSocket
>[];
...
...
@@ -127,6 +129,7 @@ class GetConnect extends GetConnectInterface {
allowAutoSignedCert:
allowAutoSignedCert
,
baseUrl:
baseUrl
,
trustedCertificates:
trustedCertificates
,
withCredentials:
withCredentials
,
);
@override
...
...
lib/get_connect/http/src/http.dart
View file @
750c631
...
...
@@ -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
();
...
...
lib/get_connect/http/src/http/html/http_request_html.dart
View file @
750c631
...
...
@@ -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
...
...
lib/get_connect/http/src/http/io/http_request_io.dart
View file @
750c631
...
...
@@ -16,6 +16,7 @@ class HttpRequestImpl extends HttpRequestBase {
HttpRequestImpl
({
bool
allowAutoSignedCert
=
true
,
List
<
TrustedCertificate
>?
trustedCertificates
,
bool
withCredentials
=
false
,
})
{
_httpClient
=
io
.
HttpClient
();
if
(
trustedCertificates
!=
null
)
{
...
...
lib/get_connect/http/src/http/stub/http_request_stub.dart
View file @
750c631
...
...
@@ -7,6 +7,7 @@ class HttpRequestImpl extends HttpRequestBase {
HttpRequestImpl
({
bool
allowAutoSignedCert
=
true
,
List
<
TrustedCertificate
>?
trustedCertificates
,
bool
withCredentials
=
false
,
});
@override
void
close
()
{}
...
...
Please
register
or
login
to post a comment