diff --git a/doric-iOS/Pod/Classes/Plugin/DoricNetworkPlugin.m b/doric-iOS/Pod/Classes/Plugin/DoricNetworkPlugin.m index 9499f0b1..61dcc26f 100644 --- a/doric-iOS/Pod/Classes/Plugin/DoricNetworkPlugin.m +++ b/doric-iOS/Pod/Classes/Plugin/DoricNetworkPlugin.m @@ -25,7 +25,10 @@ @implementation DoricNetworkPlugin - (void)request:(NSDictionary *)dic withPromise:(DoricPromise *)promise { NSString *url = [dic optString:@"url"]; NSString *method = [dic optString:@"method"]; - NSDictionary *headers = [dic optObject:@"headers"]; + NSMutableDictionary *headers = [[dic optObject:@"headers"] mutableCopy]; + if(!headers[@"Content-Type"]){ + headers[@"Content-Type"] = @"application/json; charset=utf-8"; + } NSNumber *timeout = [dic optNumber:@"timeout"]; NSString *data = [dic optString:@"data"]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];