Can we pass Arrays/Objects as parameters to KCSCustomEndpoint? Because, when I do this, I get an error saying "There request body is empty or incomplete" error.
All the objects have to be JSON-types: NSNumber, NSString, NSDictionary, NSArray. Any values in an array or dictionary have to be one of those types too.
H
Harish Geeth
said
over 7 years ago
Thank you for responding. So the above code should work right?
M
Mike
said
over 7 years ago
as long as self.pictureObject is one of those basic types and everything inside self.inviteeList is too
J
Joshua Cleetus
said
over 7 years ago
Hi Harish
You need to pass in the parameters as a dictionary
Harish Geeth
Can we pass Arrays/Objects as parameters to KCSCustomEndpoint? Because, when I do this, I get an error saying "There request body is empty or incomplete" error.
[KCSCustomEndpoints callEndpoint:@"giveTheseUsersAccessToPictures" params:@{@"picture":self.pictureObject,@"invitees":self.inviteeList} completionBlock:^(id results, NSError *error) {
NSLog(@"Picture object...%@",self.pictureObject);
if (!error) {
NSLog(@"CUSTOME ENDPOINT...%@",results);
}else{
NSLog(@"CUSTOM ENPOINT ERROR...%@",error);
}
}];
Thank you,