I am integrating RestKit with my project. I am using the version RestKit-0.20.2. Is there any way we can do the requests without object mapping in this version? I want to do the same thing the poster does here: Parsing JSON without Object Mapping in Restkit iOS. But it seems its a old version, and RKClient is not available in 0.20.2.
Is it possible to do request without object mapping using RestKit-0.20.2?
P.S.: I searched in Google and I could not be able to find/recognize the correct answer for my question as I am new to RestKit.
Thanks everyone!
RestKit uses AFNetworking
to perform all of its raw network communication and builds mapping on top. So, if you need to make requests without mapping you have full access to the AFNetworking
classes to do so.
I needed to send a PUT without object (and with Basic authorization). After trying different approaches, I finally sent the request using AFHTTPClient
directly:
AFHTTPClient* client = [AFHTTPClient clientWithBaseURL:[NSURL URLWithString:@"http://the.host"]];
[client setAuthorizationHeaderWithUsername:username password:password];
[client putPath:@"/api/resource" parameters:nil success:success failure:failure];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With