We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0642b2b commit 1796a1eCopy full SHA for 1796a1e
1 file changed
lib/extensions/request.dart
@@ -21,7 +21,13 @@ extension RequestCopyWith on Request {
21
final copied = Request(
22
method?.asString ?? this.method,
23
url ?? this.url,
24
- )..body = this.body;
+ )..bodyBytes = this.bodyBytes;
25
+
26
+ try {
27
+ copied.body = this.body;
28
+ } catch (e) {
29
+ // Do not try to get body as string when it is not parseable
30
+ }
31
32
if (body != null) {
33
copied.body = body;
0 commit comments