How to add lowercase field to NSURLRequest header field?
- by Drewsmits
I'm getting pretty frustrated figuring out how to add a lowercase header field to an NSMutableURLRequest.
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:MyURLString]];
[urlRequest setValue:@"aValue" forHTTPHeaderField:@"field"];
In the example above, "field" get's switched to "Field," since the header field names are case insensitive. I wouldn't think this should happen, but it does. The API I am working with is case sensitive, so my GET request is ignored. Is there any way to override the case switch?
Thanks