Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 8b7f927

Browse files
committed
Update the SessionFetcher Dep.
Update the code to use the helper instead of the mutableRequest api. This update the code for the mutableRequest change in google/gtm-session-fetcher#48
1 parent 1f626e9 commit 8b7f927

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

Source/Objects/GTLService.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,11 @@ - (GTLUploadFetcherClass *)uploadFetcherWithRequest:(NSURLRequest *)request
711711

712712
NSString *slug = [uploadParams slug];
713713
if ([slug length] > 0) {
714+
#if GTL_USE_SESSION_FETCHER
715+
[fetcher setRequestValue:slug forHTTPHeaderField:@"Slug"];
716+
#else
714717
[[fetcher mutableRequest] setValue:slug forHTTPHeaderField:@"Slug"];
718+
#endif
715719
}
716720
return fetcher;
717721
}

Source/Tests/GTLServiceTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ - (void)testServiceRPCFetch {
366366
maxUploadProgress = numberOfBytesRead;
367367
};
368368

369-
NSString *headerValue = [queryTicket.objectFetcher.mutableRequest valueForHTTPHeaderField:@"X-Feline"];
369+
NSString *headerValue = [queryTicket.objectFetcher.request valueForHTTPHeaderField:@"X-Feline"];
370370
XCTAssertEqualObjects(headerValue, @"Fluffy");
371371

372372
[self service:service waitForTicket:queryTicket];

0 commit comments

Comments
 (0)