Skip to content

Commit

Permalink
Merge pull request #6991 from cheekiatng/timob-18902
Browse files Browse the repository at this point in the history
[TIMOB-18902] Support JSON in multipart post
  • Loading branch information
cheekiatng committed Aug 13, 2015
2 parents 19f7fd8 + 7382a9e commit 1b0d4a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Binary file modified iphone/Classes/APSHTTPClient/libAPSHTTPClient.a
Binary file not shown.
5 changes: 4 additions & 1 deletion iphone/Classes/TiNetworkHTTPClientProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ -(void)send:(id)args
[form addFormData:[blob data] fileName:name fieldName:key];
}
}
else if ([value isKindOfClass:[NSDictionary class]]) {
[form setJSONData:value];
}
else {
[form addFormKey:key
andValue:[TiUtils stringValue:value]];
Expand All @@ -225,7 +228,7 @@ -(void)send:(id)args
[form setStringData:[TiUtils stringValue:arg]];
}
}

if(form != nil) {
[httpRequest setPostForm:form];
}
Expand Down

0 comments on commit 1b0d4a8

Please sign in to comment.