File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
packages/functions_client/lib/src Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,11 @@ class FunctionsClient {
113
113
);
114
114
final fields = body as Map <String , String >? ;
115
115
116
- request = http.MultipartRequest (method.name , uri)
116
+ request = http.MultipartRequest (method.value , uri)
117
117
..fields.addAll (fields ?? {})
118
118
..files.addAll (files);
119
119
} else {
120
- final bodyRequest = http.Request (method.name , uri);
120
+ final bodyRequest = http.Request (method.value , uri);
121
121
122
122
final String ? bodyStr;
123
123
if (body == null ) {
Original file line number Diff line number Diff line change @@ -4,11 +4,15 @@ import 'dart:typed_data';
4
4
import 'package:http/http.dart' ;
5
5
6
6
enum HttpMethod {
7
- get ,
8
- post,
9
- put,
10
- delete,
11
- patch,
7
+ get ("GET" ),
8
+ post ("POST" ),
9
+ put ("PUT" ),
10
+ delete ("DELETE" ),
11
+ patch ("PAtch" );
12
+
13
+ /// The uppercase HTTP method name. This should be used for a [Request]
14
+ final String value;
15
+ const HttpMethod (this .value);
12
16
}
13
17
14
18
class FunctionResponse {
You can’t perform that action at this time.
0 commit comments