File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -443,12 +443,18 @@ - (NSDictionary *) getConfigForProvider:(NSString *)name
443
443
URL: apiUrl
444
444
items: items];
445
445
446
+ // Allow json body in POST / PUT requests
447
+
446
448
NSDictionary *body = [opts objectForKey: @" body" ];
447
449
if (body != nil ) {
448
- for (NSString *key in body) {
449
- NSData *data = [[NSString stringWithFormat: @" %@ " , [body valueForKey: key]] dataUsingEncoding: NSUTF8StringEncoding];
450
- [request addMultiPartData: data withName: key type: @" application/json" ]; // TODO: How should we handle different body types?
451
- }
450
+ /* for (NSString *key in body) {
451
+ NSString *value = [body valueForKey:key];
452
+
453
+ if(value != nil) {
454
+ [request.content.HTTPBody addObject:];
455
+ }
456
+ }*/
457
+ [request.content setHTTPBody: body];
452
458
}
453
459
454
460
request.account = existingAccount;
You can’t perform that action at this time.
0 commit comments