title: status code: 400, headers in afnetworking3.0 in ios
body: <p><a href="https://i.stack.imgur.com/pcS8T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pcS8T.png" alt="error here"></a> 
  This is screen shot from postman client .that api is working what is issue in my code how to set response and request .
  i am making a post request in objective c using the AFNetworking 3.0  but request response bad request (400)
  this is the errors </p>
  
  <pre><code>{ status code: 400, headers {
      "Cache-Control" = private;
      "Content-Length" = 1647;
      "Content-Type" = "text/html";
      Date = "Sat, 09 Apr 2016 15:49:32 GMT";
      Server = "Microsoft-IIS/7.5";
      "X-AspNet-Version" = "4.0.30319";
      "X-Powered-By" = "ASP.NET";
  } }, NSErrorFailingURLKey=http://mytesturl_Json.svc/ValidateLoginService, com.alamofire.serialization.response.error.data=&lt;efbbbf3c 3f786d6c
  </code></pre>
  
  <p>this the code to make a post request</p>
  
  <pre><code> AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc]initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
  
   manager.requestSerializer = [AFJSONRequestSerializer serializer];
   manager.responseSerializer.acceptableContentTypes = [manager.responseSerializer.acceptableContentTypes setByAddingObject:@"text/html"];
  
      [manager POST:@"http://mytesturl_Json.svc/ValidateLoginService" parameters:inputs progress:nil success:^(NSURLSessionTask *task, id responseObject) {
  
          NSLog(@"JSON: %@", responseObject);
  
      } failure:^(NSURLSessionTask *operation, NSError *error) {
          NSLog(@"Error: %@", error);
  
      }];
  </code></pre>
  
  <p>i tried like this also </p>
  
  <pre><code>-(void)postdata
  {
      NSError *error;
  
      NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
      NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:nil];
      NSURL *url = [NSURL URLWithString:@"http://virtuzo.in/AhprepaidTestService/AhprepaidAPI_Json.svc/ValidateLoginService"];
      NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url
                                                             cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                         timeoutInterval:60.0];
  
      [request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
      [request addValue:@"application/json" forHTTPHeaderField:@"Accept"];
  
      [request setHTTPMethod:@"POST"];
      NSDictionary *mapData = [[NSDictionary alloc] initWithObjectsAndKeys: @"admin", @"UserName",
                               @"1234", @"Pwd",
                               nil];
      NSData *postData = [NSJSONSerialization dataWithJSONObject:mapData options:0 error:&amp;error];
      [request setHTTPBody:postData];
  
  
      NSURLSessionDataTask *postDataTask = [session dataTaskWithRequest:request    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  
          NSLog(@"reponse==%@",response);
          NSLog(@"error==%@",error);
  
  
      }];
  
      [postDataTask resume];
  
  }
  </code></pre>
  
  <p><strong>still i am getting same error</strong></p>
  
  <pre><code>reponse==&lt;NSHTTPURLResponse: 0x7f9baa433990&gt; { URL: http://virtuzo.in/AhprepaidTestService/AhprepaidAPI_Json.svc/ValidateLoginService } { status code: 400, headers {
      "Cache-Control" = private;
      "Content-Length" = 1647;
      "Content-Type" = "text/html";
      Date = "Thu, 14 Apr 2016 02:57:21 GMT";
      Server = "Microsoft-IIS/7.5";
      "X-AspNet-Version" = "4.0.30319";
      "X-Powered-By" = "ASP.NET";
  } }
  2016-04-14 08:27:22.833 Ahprepaid[79163:1281702] error==(null)
  </code></pre>