title: User Login With AFNetworking
body: <p>I am building my first iOS app.</p>
  
  <p>I have got the backend code done, but I am struggling with the Objective-C part of it.</p>
  
  <p>I have a signup / login page. </p>
  
  <p>But I don't know how to send that data to my server using Objective C.</p>
  
  <p>I have read that AFNetworking is good, but I was wondering how I could use that for user login .</p>
  
  <p>I have downloaded  and added AFNetworking to my XCode Project and set up headers.</p>
  
  <pre><code>AFHTTPClient *client = [AFHTTPClient clientWithBaseURL:[NSURL URLWithString:@"http://examplewebsite.com]];
  
  [client setDefaultHeader:@"key" value:@"value"];
  [client setAuthorizationHeaderWithUsername:@"username" password:@"password"];
  [client setAuthorizationHeaderWithToken:@"token"];
  
  NSURLRequest *request = [client requestWithMethod:@"someMethod" path:@"somePath" parameters:nil];
  
  AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
  </code></pre>
  
  <p>but I am still lost.</p>