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 01551e3 commit 61cc7c0Copy full SHA for 61cc7c0
2 files changed
packages/functions_client/lib/src/functions_client.dart
@@ -132,11 +132,11 @@ class FunctionsClient {
132
);
133
final fields = body as Map<String, String>?;
134
135
- request = http.MultipartRequest(method.name, uri)
+ request = http.MultipartRequest(method.name.toUpperCase(), uri)
136
..fields.addAll(fields ?? {})
137
..files.addAll(files);
138
} else {
139
- final bodyRequest = http.Request(method.name, uri);
+ final bodyRequest = http.Request(method.name.toUpperCase(), uri);
140
141
if (body == null) {
142
// No body to set
packages/functions_client/test/functions_dart_test.dart
@@ -186,7 +186,7 @@ void main() {
186
187
188
final req = customHttpClient.receivedRequests.last;
189
- expect(req.method, 'get');
+ expect(req.method, 'GET');
190
});
191
192
test('PUT method', () async {
@@ -196,7 +196,7 @@ void main() {
196
197
198
199
- expect(req.method, 'put');
+ expect(req.method, 'PUT');
200
201
202
test('DELETE method', () async {
@@ -206,7 +206,7 @@ void main() {
206
207
208
209
- expect(req.method, 'delete');
+ expect(req.method, 'DELETE');
210
211
212
test('PATCH method', () async {
@@ -216,7 +216,7 @@ void main() {
216
217
218
219
- expect(req.method, 'patch');
+ expect(req.method, 'PATCH');
220
221
222
0 commit comments