I have a REST method at http://api.mysite/RestMethod?uid=1 that accepts Credentials object in the body of the request. Credentials object is pretty simple: has two properties, UserName and Password. After successfull request the method returns an integer.
I want to put Credentials to the above URL and get back the returned integer value. All the examples out there show PUT when request and response both work with the same type object. How would I get back an int?
I was able to get PUT working using
[objectManager putObject:credentials delegate:self];
RestKit shows that response came back with Status Code 200. But it fails to deserialize the integer.
Any help would be highly appreciated.
Thanks.
P.S. I’m in no way required to use RestKit. I will consider other options.
In the end I ended up rewriting my API method to return same
Credentialsobject with a boolean flagIsAuthenticatedset to either true or false, and usedRKObjectManagermappings to map serializers/deserializers to the JSON