File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 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
443443 URL: apiUrl
444444 items: items];
445445
446+ // Allow json body in POST / PUT requests
447+
446448 NSDictionary *body = [opts objectForKey: @" body" ];
447449 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];
452458 }
453459
454460 request.account = existingAccount;
You can’t perform that action at this time.
0 commit comments