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
Rodrigo
2021-08-28 12:23:39 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
765517b273028662782cdd8689d2fc8858d9a7fd
765517b2
1 parent
a6c25390
Missing arguments of copyWith
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
lib/get_connect/http/src/request/request.dart
lib/get_connect/http/src/request/request.dart
View file @
765517b
...
...
@@ -80,18 +80,14 @@ class Request<T> {
String
?
method
,
Map
<
String
,
String
>?
headers
,
Stream
<
List
<
int
>>?
bodyBytes
,
bool
followRedirects
=
true
,
int
maxRedirects
=
4
,
bool
?
followRedirects
,
int
?
maxRedirects
,
int
?
contentLength
,
FormData
?
files
,
bool
persistentConnection
=
true
,
bool
?
persistentConnection
,
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
);
...
...
@@ -100,13 +96,13 @@ class Request<T> {
return
Request
<
T
>.
_
(
url:
url
??
this
.
url
,
method:
method
??
this
.
method
,
bodyBytes:
bodyBytes
??
=
BodyBytesStream
.
fromBytes
(
const
[])
,
bodyBytes:
bodyBytes
??
this
.
bodyBytes
,
headers:
headers
==
null
?
this
.
headers
:
Map
.
from
(
headers
),
followRedirects:
followRedirects
,
maxRedirects:
maxRedirects
,
followRedirects:
followRedirects
??
this
.
followRedirects
,
maxRedirects:
maxRedirects
??
this
.
maxRedirects
,
contentLength:
contentLength
??
this
.
contentLength
,
files:
files
??
this
.
files
,
persistentConnection:
persistentConnection
,
persistentConnection:
persistentConnection
??
this
.
persistentConnection
,
decoder:
decoder
??
this
.
decoder
,
);
}
...
...
Please
register
or
login
to post a comment