Starting points for your research ...
NSMutableURLRequest
Here you can set the eTag value for your request.
[self addValue:eTag forHTTPHeaderField:@"If-None-Match"];
This query can be used with NSURLConnection.
NSURLConnectionDelegate
The delegate of your NSURLConnection has a method ...
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
... where is the answer in your case NSHTTPURLResponse .
You should check the statusCode status in another delegate method ...
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
... status code 304 is received when the remote entity does not change. If the remote object is modified and supported by eTag, it can be found in [response allHeaderFields] .
source share