gowalla/AFNetworking — Issue #97: AFJSONRequestOperation and Accept header
Author: Torsph
Created: 2011-10-31 10:00:09+00:00
State: open

When using the AFJSONRequestOperation it does not set the Accept header to "application/json".

Currently one must do something like this:

```objective-c
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:fetchURL];
[request setValue:[NSString stringWithFormat:@"application/json"] forHTTPHeaderField:@"Accept"];

AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:nil failure:nil];
```
This is not a problem, however in my mind it should be set by the AFJSONRequestOperation class. Since it is handling both request (that should just accept JSON) and JSON parsing.

If it is the case that one should set the accept header or it should be done in another way.. Then you can just remove the issue :)