facebook/facebook-php-sdk-v4 — pull request #38 by bartekn (2014-05-06 17:22:31+00:00)
Title: ETag support

Adds [HTTP ETag](http://en.wikipedia.org/wiki/HTTP_ETag) support, proven solution to save a lot of network bandwidth. Usage:

```php
// Send request with no ETag check
$response = (
new FacebookRequest(
FacebookTestHelper::$testSession,
'GET',
'/104048449631599'
))->execute();

// Save ETag for future use
$etag = $response->getETag();

// Send request **with** ETag check (6th FacebookRequest constructor parameter)
$response = (
new FacebookRequest(
FacebookTestHelper::$testSession,
'GET',
'/104048449631599',
null,
null,
$etag
))->execute();

if ($response->isETagHit()) {
// Content didn't change
} else {
// Get a new ETag and cache a new content
$etag = $response->getETag();
}
```
Tests can be found in `tests/ETagTest.php` file.