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
Eduardo Florence
2020-12-15 01:01:31 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8986bbb4487aa0c5aefda9b2895168b869e7f448
8986bbb4
1 parent
d093b139
Handles Response when there is no content-type and body
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
lib/get_connect/http/src/http/io/http_request_io.dart
lib/get_connect/http/src/http/utils/body_decoder.dart
lib/get_connect/http/src/http/io/http_request_io.dart
View file @
8986bbb
...
...
@@ -56,7 +56,7 @@ class HttpRequestImpl extends HttpRequestBase {
final
body
=
bodyDecoded
<
T
>(
request
,
stringBody
,
response
.
headers
.
contentType
.
mimeType
,
response
.
headers
.
contentType
?
.
mimeType
,
);
return
Response
(
...
...
lib/get_connect/http/src/http/utils/body_decoder.dart
View file @
8986bbb
...
...
@@ -20,7 +20,9 @@ T bodyDecoded<T>(Request<T> request, String stringBody, String mimeType) {
}
try
{
if
(
request
.
decoder
==
null
)
{
if
(
stringBody
==
''
)
{
body
=
null
;
}
else
if
(
request
.
decoder
==
null
)
{
body
=
bodyToDecode
as
T
;
}
else
{
body
=
request
.
decoder
(
bodyToDecode
);
...
...
Please
register
or
login
to post a comment