The below piece of code works, but I haven’t figured out how.
RKObjectManager *objectManager = [RKObjectManager managerWithBaseURLString:@"https://xyz.com"];
[objectManager.client get:@"/abc/feed.json"
queryParameters:[NSDictionary dictionaryWithObject:@"lmn" forKey:@"qrs"]
delegate:self];
The method get:queryParameters:delegate: is an instance method in RKClient which returns an object of type RKRequest. The declaration is as mentioned below.
- (RKRequest *)get:(NSString *)resourcePath queryParameters:(NSDictionary *)queryParameters delegate:(NSObject<RKRequestDelegate> *)delegate;
Then how is it that this method invocation does not return anything or in other words its returned result is not being assigned to something. A person might look at the code and think that the return type for the method is void.
That’s a normal behavior of objective-c, you can ignore the return values. If you have a warning doing this you can always cast the return value to (void).