Skip to content

Commit

Permalink
plumb trackingName through to native requests
Browse files Browse the repository at this point in the history
Reviewed By: javache

Differential Revision: D3600752

fbshipit-source-id: 84cea3b67daa67b92a8845454aecf1462c857b50
  • Loading branch information
swolchok authored and Facebook Github Bot 0 committed Jul 22, 2016
1 parent 82c8129 commit 0e65456
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Libraries/Network/RCTNetworking.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ - (RCTURLRequestCancellationBlock)buildRequest:(NSDictionary<NSString *, id> *)q
request.allHTTPHeaderFields = [self stripNullsInRequestHeaders:[RCTConvert NSDictionary:query[@"headers"]]];
request.timeoutInterval = [RCTConvert NSTimeInterval:query[@"timeout"]];
NSDictionary<NSString *, id> *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<NSString *, id> *result) {
if (error) {
RCTLogError(@"Error processing request body: %@", error);
Expand Down

0 comments on commit 0e65456

Please sign in to comment.