Peter Warbo
Peter Warbo

Reputation: 11720

Objective-c - Check timestamp of a URL (file)

Given I have a URL like http://www.example.com/example.json

And I would like to check the last modified timestamp of example.json. Is there a way to do this with Objective-C?

Upvotes: 0

Views: 673

Answers (2)

highlycaffeinated
highlycaffeinated

Reputation: 19867

Bottom line is there isn't a guaranteed way. There is a Last-Modified header that you can examine in your NSHTTPURLResponse, but per the RFC it is optional.

Upvotes: 2

cxa
cxa

Reputation: 4248

Checkout – allHeaderFields of NSHTTPURLResponse.

Upvotes: 2

Related Questions