{"action":"created","issue":{"url":"https://api.github.com/repos/google/google-api-objectivec-client-for-rest/issues/232","repository_url":"https://api.github.com/repos/google/google-api-objectivec-client-for-rest","labels_url":"https://api.github.com/repos/google/google-api-objectivec-client-for-rest/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/google/google-api-objectivec-client-for-rest/issues/232/comments","events_url":"https://api.github.com/repos/google/google-api-objectivec-client-for-rest/issues/232/events","html_url":"https://github.com/google/google-api-objectivec-client-for-rest/issues/232","id":332033823,"node_id":"MDU6SXNzdWUzMzIwMzM4MjM=","number":232,"title":"Setting up caching with Google Drive API fetch","user":{"login":"hugofalkman","id":10969068,"node_id":"MDQ6VXNlcjEwOTY5MDY4","avatar_url":"https://avatars0.githubusercontent.com/u/10969068?v=4","gravatar_id":"","url":"https://api.github.com/users/hugofalkman","html_url":"https://github.com/hugofalkman","followers_url":"https://api.github.com/users/hugofalkman/followers","following_url":"https://api.github.com/users/hugofalkman/following{/other_user}","gists_url":"https://api.github.com/users/hugofalkman/gists{/gist_id}","starred_url":"https://api.github.com/users/hugofalkman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugofalkman/subscriptions","organizations_url":"https://api.github.com/users/hugofalkman/orgs","repos_url":"https://api.github.com/users/hugofalkman/repos","events_url":"https://api.github.com/users/hugofalkman/events{/privacy}","received_events_url":"https://api.github.com/users/hugofalkman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-13T14:57:26Z","updated_at":"2018-06-14T11:43:48Z","closed_at":"2018-06-14T07:48:21Z","author_association":"NONE","body":"Am using the GTLRService method request(for: GTLRQuery) to generate a URLRequest. Then invoking fetcher(with: URLRequest) works fine to download a Google Drive API fileId.\r\n\r\nBut I would like to use a URLSession dataTask(with: URLRequest) for the download to do caching using URLProtocol and URLSessionDataDelegate. \r\n\r\nThe comments in the source code of the request(for: GTLRQuery) method say: \"For requests to non-public resources, the request will not yet be authorized;  that can be done using the GTLR service's authorizer.\"\r\n\r\nI guess I might use the GTLRQuery additionalHTTPHeaders method to add the authorization to the URLRequest, but is it documented anywhere how to create the header from a GTMFetcherAuthorizationProtocol object?\r\n\r\nPlease if at all possible respond using Swift terminology, my objc knowledge is minimal."},"comment":{"url":"https://api.github.com/repos/google/google-api-objectivec-client-for-rest/issues/comments/397265655","html_url":"https://github.com/google/google-api-objectivec-client-for-rest/issues/232#issuecomment-397265655","issue_url":"https://api.github.com/repos/google/google-api-objectivec-client-for-rest/issues/232","id":397265655,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzI2NTY1NQ==","user":{"login":"thomasvl","id":5279928,"node_id":"MDQ6VXNlcjUyNzk5Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/5279928?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasvl","html_url":"https://github.com/thomasvl","followers_url":"https://api.github.com/users/thomasvl/followers","following_url":"https://api.github.com/users/thomasvl/following{/other_user}","gists_url":"https://api.github.com/users/thomasvl/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasvl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasvl/subscriptions","organizations_url":"https://api.github.com/users/thomasvl/orgs","repos_url":"https://api.github.com/users/thomasvl/repos","events_url":"https://api.github.com/users/thomasvl/events{/privacy}","received_events_url":"https://api.github.com/users/thomasvl/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T11:43:48Z","updated_at":"2018-06-14T11:43:48Z","author_association":"MEMBER","body":"> Thanks. Tried both the selector and completion handler versions of the authorizer authorizeRequest method but can't see that it actually updated the URLRequest. Google Drive certainly didn't accept the (updated?) request.\r\n\r\nSo the completion block got called without it updating the request?  That surprises me and sounds worth of an issue opened against GIDSignIn.\r\n"}}
{"actor":{"display_login":"thomasvl"}}