File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/functions_client/test Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ class CustomHttpClient extends BaseClient {
63
63
} else {
64
64
final Stream <List <int >> stream;
65
65
final Map <String , String > headers;
66
-
66
+
67
67
if (request is MultipartRequest ) {
68
68
stream = Stream .value (
69
69
utf8.encode (jsonEncode ([
@@ -77,14 +77,16 @@ class CustomHttpClient extends BaseClient {
77
77
headers = {"Content-Type" : "application/json" };
78
78
} else {
79
79
// Check if the request contains binary data (Uint8List)
80
- final isOctetStream = request.headers['Content-Type' ] == 'application/octet-stream' ;
80
+ final isOctetStream =
81
+ request.headers['Content-Type' ] == 'application/octet-stream' ;
81
82
if (isOctetStream) {
82
83
// Return the original binary data
83
84
final bodyBytes = (request as Request ).bodyBytes;
84
85
stream = Stream .value (bodyBytes);
85
86
headers = {"Content-Type" : "application/octet-stream" };
86
87
} else {
87
- stream = Stream .value (utf8.encode (jsonEncode ({"key" : "Hello World" })));
88
+ stream =
89
+ Stream .value (utf8.encode (jsonEncode ({"key" : "Hello World" })));
88
90
headers = {"Content-Type" : "application/json" };
89
91
}
90
92
}
You can’t perform that action at this time.
0 commit comments