AFNetworking GET web service internal server error (500)
<p>I am trying to call a GET web service using AFNetworking and its returning internal server error (500) error. The same web service is working fine in Android!</p>

<p>PFB my code and error message.</p>

<pre><code>NSURL *url = [NSURL URLWithString:@GET_HOME_SLIDERS];
NSURLRequest *request = [NSURLRequest requestWithURL:url];

AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
operation.responseSerializer = [AFJSONResponseSerializer serializer];

[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {

    NSLog(@"%@", (NSDictionary *)responseObject);

} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    NSLog(@"Error: %@", error);
}];

[operation start];
</code></pre>

<p>And the error description is;</p>

<p>Error: Error Domain=&lt;<strong>domain name</strong>>.error.serialization.response Code=-1011 "Request failed: internal server error (500)" UserInfo=0x7fb9f243d9a0 {&lt;<strong>domain name</strong>>.serialization.response.error.response= { URL: &lt;<strong>URL string</strong>> } { status code: 500, headers {
    "Accept-Ranges" = bytes;
    Connection = "keep-alive";
    "Content-Length" = 880;
    "Content-Type" = "application/json";
    Date = "Sat, 18 Jun 2016 06:51:54 GMT";
    Server = "nginx/1.10.1";
    "Set-Cookie" = "slim_session=a%3A1%3A%7Bs%3A10%3A%22slim.flash%22%3Ba%3A0%3A%7B%7D%7D; path=/; expires=Sat, 18-Jun-2016 07:11:54 UTC";
    "X-Served-From-Cache" = Yes;
} }, NSErrorFailingURLKey=&lt;<strong>URL String</strong>>, &lt;<strong>domain name</strong>>.serialization.response.error.data=&lt;7b227374 61747573 223a312c 22646174 61223a7b 2270726f 64756374 73223a5b 7b226964 223a2231 36222c22 6e616d65 223a2222 2c22696d 6167655f 75726c22 3a226874 74703a5c 2f5c2f6f 66666572 7361646d 696e2e61 6c6d616e 616d6173 6176696e 67732e63 6f6d5c2f 66696c65 735c2f77 3632342d 68323934 2d70315c 2f62616e 6e657273 325c2f37 2e6a7067 227d2c7b 22696422 3a223135 222c226e 616d6522 3a22222c 22696d61 67655f75 726c223a 22687474 703a5c2f 5c2f6f66 66657273 61646d69 6e2e616c 6d616e61 6d617361 76696e67 732e636f 6d5c2f66 696c6573 5c2f7736 32342d68 3239342d 70315c2f 62616e6e 65727332 5c2f362e 6a706722 7d2c7b22 6964223a 22313422 2c226e61 6d65223a 22222c22 696d6167 655f7572 6c223a22 68747470 3a5c2f5c 2f6f6666 65727361 646d696e 2e616c6d 616e616d 61736176 696e6773 2e636f6d 5c2f6669 6c65735c 2f773632 342d6832 39342d70 315c2f62 616e6e65 7273325c 2f352e6a 7067227d 2c7b2269 64223a22 3133222c 226e616d 65223a22 73646673 222c2269 6d616765 5f75726c 223a2268 7474703a 5c2f5c2f 6f666665 72736164 6d696e2e 616c6d61 6e616d61 73617669 6e67732e 636f6d5c 2f66696c 65735c2f 77363234 2d683239 342d7031 5c2f6261 6e6e6572 73325c2f 342e6a70 67227d2c 7b226964 223a2231 32222c22 6e616d65 223a2273 616d706c 65222c22 696d6167 655f7572 6c223a22 68747470 3a5c2f5c 2f6f6666 65727361 646d696e 2e616c6d 616e616d 61736176 696e6773 2e636f6d 5c2f6669 6c65735c 2f773632 342d6832 39342d70 315c2f62 616e6e65 7273325c 2f332e6a 7067227d 2c7b2269 64223a22 3131222c 226e616d 65223a22 222c2269 6d616765 5f75726c 223a2268 7474703a 5c2f5c2f 6f666665 72736164 6d696e2e 616c6d61 6e616d61 73617669 6e67732e 636f6d5c 2f66696c 65735c2f 77363234 2d683239 342d7031 5c2f6261 6e6e6572 73325c2f 322e6a70 67227d2c 7b226964 223a2231 222c226e 616d6522 3a223630 25206f66 66657220 616c6c20 73686f73 222c2269 6d616765 5f75726c 223a2268 7474703a 5c2f5c2f 6f666665 72736164 6d696e2e 616c6d61 6e616d61 73617669 6e67732e 636f6d5c 2f66696c 65735c2f 77363234 2d683239 342d7031 5c2f6261 6e6e6572 73325c2f 312e6a70 67227d5d 7d2c2265 72726f72 223a6661 6c73657d>, NSLocalizedDescription=Request failed: internal server error (500)}</p>

<p>Please help.</p>