I need send some data in http header each time when I do request to server (whith get and post methods). I am using RKObjectManager from restkit. Also I need check status returned by server (401, 200, 404 e.t.c). Does anybody know the solution?
Thanks!
in version 0.20.0rc1 you can use the following code:
[[[RKObjectManager sharedManager] HTTPClient] setDefaultHeader:myHeaderName value:myValue];
If you need to send custom headers with your requests, i'd suggest to use the RKClient
property HTTPHeaders
, for example:
[[[[RKObjectManager sharedManager] client] HTTPHeaders] setValue:myValue
forKey:myHeaderName];
For the status code, see my another answer.
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