I am trying to send some information to salesforce on my iOS7 device. I am using the SFRestAPI of Salesforce. In my API class I've the following:
@HttpPost
global static ResonseWrapper doPost(String value1){
// Some code..
String action = RestContext.request.params.get('value2');
}
How am I supposed to fill value1 and value2? I am able to fill value2 in a doGet request, but I can't figure out how I fill value1 and value2 in a doPost.
I've the following post method in ios:
- (void) sendAsyncRestRequestPost
{
SFRestRequest *postRequest = [[SFRestRequest alloc]init];
[postRequest setEndpoint:[NSString stringWithFormat:@"services/apexrest%@/somedata/", @""]];
[postRequest setPath:[NSString stringWithFormat:@"services/apexrest%@/somedata/", @""]];
[postRequest setMethod:SFRestMethodPOST];
[[SFRestAPI sharedInstance] send:postRequest delegate:self];
}