title: how to do a post using restkit
body: <p>I am building an app using restkit to talk to my webservice. First of all I'm very new to this. What I need to do is post a username and password to my webservice so that the url looks like this.</p>
  
  <pre><code>http://urllinkcompany.com/en/webservice/company-user/login/apikey/key12345678?email=test@test.be&amp;pwd=testtest
  </code></pre>
  
  <p>When I post this I get a json back. This json contains an status code. <code>status = 200 --&gt; OK
  Status = 404 --&gt; NOT ok</code></p>
  
  <p>Now I tried to post something and NSLog this status code.</p>
  
  <pre><code>- (IBAction)login:(id)sender {
  
      RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[Person class]];
      [mapping addAttributeMappingsFromDictionary:@{
       @"data.user.cu_email":     @"cu_email",
  
       }];
  
  
      RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping pathPattern:nil keyPath:nil statusCodes:nil];
  
      NSString *baseUrl = @"http://urllinkcompany.com/en/webservice/company-user/login/apikey/key12345678?";
      NSString *strUrl = [NSString stringWithFormat:@"%@email=%@&amp;pwd=%@",baseUrl,_txtLogin.text,_txtPass.text];
      NSURL *url = [NSURL URLWithString:strUrl];
      NSLog(@"url is: %@",strUrl);
      NSURLRequest *request = [NSURLRequest requestWithURL:url];
      RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc] initWithRequest:request responseDescriptors:@[responseDescriptor]];
      [operation setCompletionBlockWithSuccess:^(RKObjectRequestOperation *operation, RKMappingResult *result) {
           NSLog(@"data result is %@", [result valueForKeyPath:@"data.status"]);
      } failure:nil];
  
  }
  </code></pre>
  
  <p>But I am getting this error.</p>
  
  <pre><code> E restkit.network:RKObjectRequestOperation.m:285 Object request failed: Underlying HTTP request operation failed with error: Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0x1ed57c50 {NSUnderlyingError=0x20161e70 "bad URL", NSLocalizedDescription=bad URL}
  2013-01-07 11:48:51.407 Offitel2[22086:907] I restkit.network:RKHTTPRequestOperation.m:152 GET '(null)'
  2013-01-07 11:48:51.408 Offitel2[22086:907] E restkit.network:RKHTTPRequestOperation.m:173 GET '(null)' (0) [0.0010 s]: Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0x1ed57c50 {NSUnderlyingError=0x20161e70 "bad URL", NSLocalizedDescription=bad URL}
  </code></pre>
  
  <p>Could anybody help me with this?</p>
  
  <p>Kind regards</p>