fix(ios): remove hardcoded X-Requested-With header (#287)

no other platform sets this header and it should be up to the user if it's desired to 'disguise' the HTTP call as an XMLHttpRequest
This commit is contained in:
Tim Brust
2020-10-27 16:40:46 +01:00
committed by GitHub
parent dcae9269b8
commit 88e39df8a5

View File

@@ -102,8 +102,6 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
- (void)applyRequestHeaders:(NSDictionary*)headers toRequest:(NSMutableURLRequest*)req
{
[req setValue:@"XMLHttpRequest" forHTTPHeaderField:@"X-Requested-With"];
for (NSString* headerName in headers) {
id value = [headers objectForKey:headerName];
if (!value || (value == [NSNull null])) {