Hey Everyone,
I didn't know if anyone here has had experience with the gtm-http-fetcher provided by google. I am specifically looking to modify the HTTP headers in a request. Any help or examples would be appreciated.
-Pat
Hey Everyone,
I didn't know if anyone here has had experience with the gtm-http-fetcher provided by google. I am specifically looking to modify the HTTP headers in a request. Any help or examples would be appreciated.
-Pat
Since you supply the request to be fetched, you can specify the headers in the request as well. For example,
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setValue:@"MyApp" forHTTPHeaderField:@"User-Agent"];
GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:request];
[fetcher beginFetchWithDelegate:self
didFinishSelector:@selector(fetcher:finishedWithData:error:)];