From 0e65456d9c8e08a0605911d37c21e14c4fb04157 Mon Sep 17 00:00:00 2001 From: Scott Wolchok Date: Fri, 22 Jul 2016 11:14:10 -0700 Subject: [PATCH] plumb trackingName through to native requests Reviewed By: javache Differential Revision: D3600752 fbshipit-source-id: 84cea3b67daa67b92a8845454aecf1462c857b50 --- Libraries/Network/RCTNetworking.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Libraries/Network/RCTNetworking.m b/Libraries/Network/RCTNetworking.m index 5be3de7f901037..ea912e0f82c647 100644 --- a/Libraries/Network/RCTNetworking.m +++ b/Libraries/Network/RCTNetworking.m @@ -223,6 +223,12 @@ - (RCTURLRequestCancellationBlock)buildRequest:(NSDictionary *)q request.allHTTPHeaderFields = [self stripNullsInRequestHeaders:[RCTConvert NSDictionary:query[@"headers"]]]; request.timeoutInterval = [RCTConvert NSTimeInterval:query[@"timeout"]]; NSDictionary *data = [RCTConvert NSDictionary:RCTNilIfNull(query[@"data"])]; + NSString *trackingName = data[@"trackingName"]; + if (trackingName) { + [NSURLProtocol setProperty:trackingName + forKey:@"trackingName" + inRequest:request]; + } return [self processDataForHTTPQuery:data callback:^(NSError *error, NSDictionary *result) { if (error) { RCTLogError(@"Error processing request body: %@", error);