Skip to content

Commit

Permalink
some changes are done related to the fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Vignesh-codezyng committed Mar 26, 2022
1 parent ad9208d commit 859b497
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "GTMSessionFetcher",
"repositoryURL": "https://github.com/google/gtm-session-fetcher.git",
"state": {
"branch": null,
"revision": "bc6a19702ac76ac4e488b68148710eb815f9bc56",
"version": "1.7.0"
}
}
]
},
"version": 1
}
Binary file added Source/.DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions Source/Objects/GTLRService.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ typedef void (^GTLRServiceTestBlock)(GTLRServiceTicket *testTicket,
*/
@property(nonatomic, copy, nullable) NSString *APIKey;

@property(nonatomic, retain, nullable) GTMSessionFetcher *fetcher;

/**
* The Bundle Identifier to use for the API key restriction. This will be
* sent in an X-Ios-Bundle-Identifier header; for more information see
Expand Down
4 changes: 2 additions & 2 deletions Source/Objects/GTLRService.m
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,7 @@ - (GTLRServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL
}

GTMSessionFetcherService *fetcherService = ticket.fetcherService;
GTMSessionFetcher *fetcher;

GTMSessionFetcher *fetcher;
if (uploadParams == nil || uploadParams.shouldUploadWithSingleRequest) {
// Create a single-request fetcher.
fetcher = [fetcherService fetcherWithRequest:request];
Expand All @@ -712,6 +711,7 @@ - (GTLRServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL
params:uploadParams];
}

self.fetcher = fetcher;
if (ticket.allowInsecureQueries) {
fetcher.allowLocalhostRequest = YES;
fetcher.allowedInsecureSchemes = @[ @"http" ];
Expand Down
Binary file added Tests/.DS_Store
Binary file not shown.

0 comments on commit 859b497

Please sign in to comment.