user1688346
user1688346

Reputation: 1970

Migrate restkit v0.20

Migrated to v0.20 and looks like RKClient deprecated.

Any idea how to set the user name and password? I used to do this in 1.0

[[RKClient sharedClient] setUsername:@"username"];
[[RKClient sharedClient] setPassword:@"password"];

Upvotes: 0

Views: 87

Answers (1)

flashfabrixx
flashfabrixx

Reputation: 1183

Instead of the RKClient RestKit 0.20 now uses AFNetworking and it's client methods. However you can call the client of the RKObjectManager via HTTPClient, so setting the authorization header should be looking like

[[RKObjectManager sharedManager].HTTPClient setAuthorizationHeaderWithUsername:@"username" 
                                                                      password:@"password"];

For all other methods (authorization isn't listed there), check out the wiki document.

Upvotes: 1

Related Questions