plumb trackingName through to native requests
Reviewed By: javache Differential Revision: D3600752 fbshipit-source-id: 84cea3b67daa67b92a8845454aecf1462c857b50
This commit is contained in:
parent
82c8129627
commit
0e65456d9c
|
@ -223,6 +223,12 @@ RCT_EXPORT_MODULE()
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue