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
kevin.zhang
2021-05-18 19:14:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
41c5726efb7e5d211e80ccf44994b4c6e6e1aeae
41c5726e
1 parent
dd5aaee1
fix: add appendHeader parameter for merge/replace origin headers
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
lib/get_connect/http/src/request/request.dart
lib/get_connect/http/src/request/request.dart
View file @
41c5726
...
...
@@ -86,10 +86,17 @@ class Request<T> {
FormData
?
files
,
bool
persistentConnection
=
true
,
Decoder
<
T
>?
decoder
,
bool
appendHeader
=
true
,
})
{
if
(
followRedirects
)
{
assert
(
maxRedirects
>
0
);
}
// If appendHeader is set to true, we will merge origin headers with that
if
(
appendHeader
&&
headers
!=
null
)
{
headers
.
addAll
(
this
.
headers
);
}
return
Request
.
_
(
url:
url
??
this
.
url
,
method:
method
??
this
.
method
,
...
...
Please
register
or
login
to post a comment