From 7042b8c6e595e9c95159275faf86fcee8d12c906 Mon Sep 17 00:00:00 2001 From: Davide Borsatto Date: Fri, 24 Aug 2018 10:19:09 +0200 Subject: [PATCH 1/3] feat(cache): Add ability to cache entries and assets via CLI --- src/Cache/BaseCacheHandler.php | 135 ++++++ src/Cache/CacheClearer.php | 48 +- src/Cache/CacheWarmer.php | 61 +-- src/Console/ClearCacheCommand.php | 8 +- src/Console/WarmUpCacheCommand.php | 8 +- tests/E2E/ConsoleTest.php | 49 ++ .../e2e_console_cache_clear_with_content.json | 431 ++++++++++++++++++ ...e2e_console_cache_warmup_with_content.json | 431 ++++++++++++++++++ 8 files changed, 1079 insertions(+), 92 deletions(-) create mode 100644 src/Cache/BaseCacheHandler.php create mode 100644 tests/Recordings/e2e_console_cache_clear_with_content.json create mode 100644 tests/Recordings/e2e_console_cache_warmup_with_content.json diff --git a/src/Cache/BaseCacheHandler.php b/src/Cache/BaseCacheHandler.php new file mode 100644 index 00000000..df92fccd --- /dev/null +++ b/src/Cache/BaseCacheHandler.php @@ -0,0 +1,135 @@ +client = $client; + $this->cacheItemPool = $cacheItemPool; + + $this->toggler = \Closure::bind(function (InstanceRepository $instanceRepository, $value) { + $previous = $instanceRepository->autoWarmup; + $instanceRepository->autoWarmup = (bool) $value; + + return $previous; + }, null, InstanceRepository::class); + } + + /** + * @param InstanceRepository $instanceRepository + * @param bool $value + * + * @return bool + */ + protected function toggleAutoWarmup(InstanceRepository $instanceRepository, $value) + { + $toggler = $this->toggler; + + return $toggler($instanceRepository, $value); + } + + /** + * @param bool $cacheContent + * + * @return ResourceInterface[] + */ + protected function fetchResources($cacheContent = false) + { + $resources = [ + $this->client->getSpace(), + $this->client->getEnvironment(), + ]; + + $query = (new Query()) + ->setLimit(100) + ; + foreach ($this->client->getContentTypes($query) as $contentType) { + $resources[] = $contentType; + } + + foreach ($resources as $resource) { + yield $resource; + } + + if ($cacheContent) { + $locales = \array_map(function (Locale $locale) { + return $locale->getCode(); + }, $this->client->getEnvironment()->getLocales()); + $locales[] = '*'; + + foreach ($this->fetchCollection('Entry', $locales) as $entry) { + yield $entry; + } + + foreach ($this->fetchCollection('Asset', $locales) as $asset) { + yield $asset; + } + } + } + + /** + * @param string $type Either 'Entry' or 'Asset' + * @param string[] $locales + * + * @return \Generator + */ + private function fetchCollection($type, $locales) + { + foreach ($locales as $locale) { + $skip = 0; + do { + $query = (new Query()) + ->setLocale($locale) + ->setLimit(1000) + ->setSkip($skip) + ; + $resources = 'Entry' === $type + ? $this->client->getEntries($query) + : $this->client->getAssets($query); + + foreach ($resources as $resource) { + yield $resource; + } + + $skip += 1000; + } while ($resources->getTotal() > $resources->getSkip() + 1000); + } + } +} diff --git a/src/Cache/CacheClearer.php b/src/Cache/CacheClearer.php index 388b6d82..899c8a9e 100644 --- a/src/Cache/CacheClearer.php +++ b/src/Cache/CacheClearer.php @@ -9,9 +9,7 @@ namespace Contentful\Delivery\Cache; -use Contentful\Delivery\Client; -use Contentful\Delivery\Query; -use Psr\Cache\CacheItemPoolInterface; +use Contentful\Delivery\SystemProperties; /** * CacheClearer class. @@ -19,51 +17,23 @@ * Use this class to clear the needed cache information from a * PSR-6 compatible pool. */ -class CacheClearer +class CacheClearer extends BaseCacheHandler { /** - * @var Client - */ - private $client; - - /** - * @var CacheItemPoolInterface - */ - private $cacheItemPool; - - /** - * CacheClearer constructor. + * @param bool $cacheContent * - * @param Client $client - * @param CacheItemPoolInterface $cacheItemPool - */ - public function __construct(Client $client, CacheItemPoolInterface $cacheItemPool) - { - $this->client = $client; - $this->cacheItemPool = $cacheItemPool; - } - - /** * @return bool */ - public function clear() + public function clear($cacheContent = false) { $api = $this->client->getApi(); - $space = $this->client->getSpace(); - $environment = $this->client->getEnvironment(); $instanceRepository = $this->client->getInstanceRepository(); - $keys = [ - $instanceRepository->generateCacheKey($api, 'Space', $space->getId()), - $instanceRepository->generateCacheKey($api, 'Environment', $environment->getId()), - ]; - - $query = (new Query()) - ->setLimit(100); - $contentTypes = $this->client->getContentTypes($query); - - foreach ($contentTypes as $contentType) { - $keys[] = $instanceRepository->generateCacheKey($api, 'ContentType', $contentType->getId()); + $keys = []; + foreach ($this->fetchResources($cacheContent) as $resource) { + /** @var SystemProperties $sys */ + $sys = $resource->getSystemProperties(); + $keys[] = $instanceRepository->generateCacheKey($api, $sys->getType(), $sys->getId(), $sys->getLocale()); } return $this->cacheItemPool->deleteItems($keys); diff --git a/src/Cache/CacheWarmer.php b/src/Cache/CacheWarmer.php index a82c096a..bf702ce0 100644 --- a/src/Cache/CacheWarmer.php +++ b/src/Cache/CacheWarmer.php @@ -9,9 +9,8 @@ namespace Contentful\Delivery\Cache; -use Contentful\Delivery\Client; -use Contentful\Delivery\Query; -use Psr\Cache\CacheItemPoolInterface; +use Contentful\Delivery\SystemProperties; +use function GuzzleHttp\json_encode as guzzle_json_encode; /** * CacheWarmer class. @@ -19,64 +18,32 @@ * Use this class to save the needed cache information in a * PSR-6 compatible pool. */ -class CacheWarmer +class CacheWarmer extends BaseCacheHandler { /** - * @var Client - */ - private $client; - - /** - * @var CacheItemPoolInterface - */ - private $cacheItemPool; - - /** - * CacheWarmer constructor. + * @param bool $cacheContent * - * @param Client $client - * @param CacheItemPoolInterface $cacheItemPool - */ - public function __construct(Client $client, CacheItemPoolInterface $cacheItemPool) - { - $this->client = $client; - $this->cacheItemPool = $cacheItemPool; - } - - /** * @return bool */ - public function warmUp() + public function warmUp($cacheContent = false) { $api = $this->client->getApi(); $instanceRepository = $this->client->getInstanceRepository(); + $previous = $this->toggleAutoWarmup($instanceRepository, false); - $space = $this->client->getSpace(); - $item = $this->cacheItemPool->getItem( - $instanceRepository->generateCacheKey($api, 'Space', $space->getId()) - ); - $item->set(\json_encode($space)); - $this->cacheItemPool->saveDeferred($item); - - $environment = $this->client->getEnvironment(); - $item = $this->cacheItemPool->getItem( - $instanceRepository->generateCacheKey($api, 'Environment', $environment->getId()) - ); - $item->set(\json_encode($environment)); - $this->cacheItemPool->saveDeferred($item); + foreach ($this->fetchResources($cacheContent) as $resource) { + /** @var SystemProperties $sys */ + $sys = $resource->getSystemProperties(); + $key = $instanceRepository->generateCacheKey($api, $sys->getType(), $sys->getId(), $sys->getLocale()); - $query = (new Query()) - ->setLimit(100); - $contentTypes = $this->client->getContentTypes($query); + $item = $this->cacheItemPool->getItem($key); + $item->set(guzzle_json_encode($resource)); - foreach ($contentTypes as $contentType) { - $item = $this->cacheItemPool->getItem( - $instanceRepository->generateCacheKey($api, 'ContentType', $contentType->getId()) - ); - $item->set(\json_encode($contentType)); $this->cacheItemPool->saveDeferred($item); } + $this->toggleAutoWarmup($instanceRepository, $previous); + return $this->cacheItemPool->commit(); } } diff --git a/src/Console/ClearCacheCommand.php b/src/Console/ClearCacheCommand.php index fa94609a..b2f65c38 100644 --- a/src/Console/ClearCacheCommand.php +++ b/src/Console/ClearCacheCommand.php @@ -32,7 +32,8 @@ protected function configure() 'The FQCN of a factory class which implements "%s".', CacheItemPoolFactoryInterface::class )), - new InputOption('use-preview', 'p', InputOption::VALUE_NONE), + new InputOption('use-preview', 'p', InputOption::VALUE_NONE, 'Use the Preview API instead of the Delivery API'), + new InputOption('cache-content', 'c', InputOption::VALUE_NONE, 'Include entries and assets'), ]); } @@ -41,7 +42,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $accessToken = $input->getOption('access-token'); $spaceId = $input->getOption('space-id'); $environmentId = $input->getOption('environment-id'); - $usePreview = $input->getOption('use-preview'); + $usePreview = (bool) $input->getOption('use-preview'); + $cacheContent = (bool) $input->getOption('cache-content'); $client = new Client($accessToken, $spaceId, $environmentId, $usePreview); $api = $client->getApi(); @@ -65,7 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } $clearer = new CacheClearer($client, $cacheItemPool); - if (!$clearer->clear()) { + if (!$clearer->clear($cacheContent)) { throw new \RuntimeException(\sprintf( 'The SDK could not clear the cache. Try checking your PSR-6 implementation (class "%s").', \get_class($cacheItemPool) diff --git a/src/Console/WarmUpCacheCommand.php b/src/Console/WarmUpCacheCommand.php index c17f825a..c7c11ca9 100644 --- a/src/Console/WarmUpCacheCommand.php +++ b/src/Console/WarmUpCacheCommand.php @@ -32,7 +32,8 @@ protected function configure() 'The FQCN of a factory class which implements "%s".', CacheItemPoolFactoryInterface::class )), - new InputOption('use-preview', 'p', InputOption::VALUE_NONE), + new InputOption('use-preview', 'p', InputOption::VALUE_NONE, 'Use the Preview API instead of the Delivery API'), + new InputOption('cache-content', 'c', InputOption::VALUE_NONE, 'Include entries and assets'), ]); } @@ -41,7 +42,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $accessToken = $input->getOption('access-token'); $spaceId = $input->getOption('space-id'); $environmentId = $input->getOption('environment-id'); - $usePreview = $input->getOption('use-preview'); + $usePreview = (bool) $input->getOption('use-preview'); + $cacheContent = (bool) $input->getOption('cache-content'); $client = new Client($accessToken, $spaceId, $environmentId, $usePreview); $api = $client->getApi(); @@ -65,7 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } $warmer = new CacheWarmer($client, $cacheItemPool); - if (!$warmer->warmUp()) { + if (!$warmer->warmUp($cacheContent)) { throw new \RuntimeException(\sprintf( 'The SDK could not warm up the cache. Try checking your PSR-6 implementation (class "%s").', \get_class($cacheItemPool) diff --git a/tests/E2E/ConsoleTest.php b/tests/E2E/ConsoleTest.php index fbf35aa3..c9444804 100644 --- a/tests/E2E/ConsoleTest.php +++ b/tests/E2E/ConsoleTest.php @@ -205,6 +205,55 @@ public function testCacheClearNotWorking() '--factory-class' => NotWorkingCachePoolFactory::class, ]); } + + /** + * @vcr e2e_console_cache_warmup_with_content.json + */ + public function testCacheWarmupWithContent() + { + $output = $this->getConsoleOutput('delivery:cache:warmup', [ + '--access-token' => 'b4c0n73n7fu1', + '--space-id' => 'cfexampleapi', + '--environment-id' => 'master', + '--factory-class' => CacheItemPoolFactory::class, + '--cache-content' => true, + ]); + + $this->assertContains('Cache warmed up for space "cfexampleapi" on environment "master" using API "DELIVERY".', $output); + + $cachePool = CacheItemPoolFactory::$pools['DELIVERY.cfexampleapi.master']; + + $this->assertTrue($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.Space.cfexampleapi.__ALL__')); + $this->assertTrue($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.Environment.master.__ALL__')); + $this->assertTrue($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.ContentType.cat.__ALL__')); + $this->assertTrue($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.ContentType.dog.__ALL__')); + $this->assertTrue($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.ContentType.human.__ALL__')); + + $this->assertTrue($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.Entry.nyancat.__ALL__')); + $this->assertTrue($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.Entry.nyancat.en_US')); + $this->assertTrue($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.Entry.nyancat.tlh')); + } + + /** + * @vcr e2e_console_cache_clear_with_content.json + */ + public function testCacheClearWithContent() + { + $output = $this->getConsoleOutput('delivery:cache:clear', [ + '--access-token' => 'b4c0n73n7fu1', + '--space-id' => 'cfexampleapi', + '--environment-id' => 'master', + '--factory-class' => CacheItemPoolFactory::class, + '--cache-content' => true, + ]); + + $this->assertContains('Cache cleared for space "cfexampleapi" on environment "master" using API "DELIVERY".', $output); + + $cachePool = CacheItemPoolFactory::$pools['DELIVERY.cfexampleapi.master']; + $this->assertFalse($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.Space.cfexampleapi.__ALL__')); + + $this->assertFalse($cachePool->hasItem('contentful.DELIVERY.cfexampleapi.master.Entry.nyancat.__ALL__')); + } } class CacheItemPoolFactory implements CacheItemPoolFactoryInterface diff --git a/tests/Recordings/e2e_console_cache_clear_with_content.json b/tests/Recordings/e2e_console_cache_clear_with_content.json new file mode 100644 index 00000000..5b1e6ade --- /dev/null +++ b/tests/Recordings/e2e_console_cache_clear_with_content.json @@ -0,0 +1,431 @@ +[{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "\"17f6b9f68596176aed46fa020bf235af\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "69495988224e7ba3d22dafdbf3de5c8e", + "Content-Length": "344", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:16 GMT", + "Via": "1.1 varnish", + "Age": "166", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1530-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098517.831032,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Space\",\n \"id\": \"cfexampleapi\"\n },\n \"name\": \"Contentful Example API\",\n \"locales\": [\n {\n \"code\": \"en-US\",\n \"default\": true,\n \"name\": \"English\",\n \"fallbackCode\": null\n },\n {\n \"code\": \"tlh\",\n \"default\": false,\n \"name\": \"Klingon\",\n \"fallbackCode\": \"en-US\"\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/locales", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "\"028bb030b13282c4390f03bf31ad99f8\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "e3b9c74dd32b2f975f8e3ab67e51c795", + "Content-Length": "546", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:16 GMT", + "Via": "1.1 varnish", + "Age": "166", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1541-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098517.951546,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 2,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"code\": \"en-US\",\n \"name\": \"English\",\n \"default\": true,\n \"fallbackCode\": null,\n \"sys\": {\n \"id\": \"2oQPjMCL9bQkylziydLh57\",\n \"type\": \"Locale\",\n \"version\": 1\n }\n },\n {\n \"code\": \"tlh\",\n \"name\": \"Klingon\",\n \"default\": false,\n \"fallbackCode\": \"en-US\",\n \"sys\": {\n \"id\": \"3zpZmkZrHTIekHmXgflXaV\",\n \"type\": \"Locale\",\n \"version\": 0\n }\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/content_types?limit=100", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"bf828301773429a5af61a14da8e539aa\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "62d63ab5d38991dff18ea0a187962762", + "Content-Length": "914", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:17 GMT", + "Via": "1.1 varnish", + "Age": "165", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1550-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098517.078768,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 4,\n \"skip\": 0,\n \"limit\": 100,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"dog\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2013-06-27T22:46:13.498Z\",\n \"updatedAt\": \"2013-09-02T14:32:11.837Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"displayField\": \"name\",\n \"name\": \"Dog\",\n \"description\": \"Bark!\",\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"description\",\n \"name\": \"Description\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"image\",\n \"name\": \"Image\",\n \"type\": \"Link\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"linkType\": \"Asset\"\n }\n ]\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2014-02-21T13:42:33.009Z\",\n \"updatedAt\": \"2014-02-21T13:42:33.009Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1\n },\n \"displayField\": \"name\",\n \"name\": \"City\",\n \"description\": null,\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"center\",\n \"name\": \"Center\",\n \"type\": \"Location\",\n \"localized\": false,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n }\n ]\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"human\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2013-06-27T22:46:14.133Z\",\n \"updatedAt\": \"2013-09-02T15:10:26.818Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 3\n },\n \"displayField\": \"name\",\n \"name\": \"Human\",\n \"description\": null,\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"description\",\n \"name\": \"Description\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"likes\",\n \"name\": \"Likes\",\n \"type\": \"Array\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"items\": {\n \"type\": \"Symbol\",\n \"validations\": []\n }\n },\n {\n \"id\": \"image\",\n \"name\": \"Image\",\n \"type\": \"Array\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": true,\n \"omitted\": false,\n \"items\": {\n \"type\": \"Link\",\n \"validations\": [],\n \"linkType\": \"Asset\"\n }\n }\n ]\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"cat\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2013-06-27T22:46:12.852Z\",\n \"updatedAt\": \"2017-07-06T09:58:52.691Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8\n },\n \"displayField\": \"name\",\n \"name\": \"Cat\",\n \"description\": \"Meow.\",\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": true,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"likes\",\n \"name\": \"Likes\",\n \"type\": \"Array\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"items\": {\n \"type\": \"Symbol\",\n \"validations\": []\n }\n },\n {\n \"id\": \"color\",\n \"name\": \"Color\",\n \"type\": \"Symbol\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"bestFriend\",\n \"name\": \"Best Friend\",\n \"type\": \"Link\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"linkType\": \"Entry\"\n },\n {\n \"id\": \"birthday\",\n \"name\": \"Birthday\",\n \"type\": \"Date\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"lifes\",\n \"name\": \"Lifes left\",\n \"type\": \"Integer\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": true,\n \"omitted\": false\n },\n {\n \"id\": \"lives\",\n \"name\": \"Lives left\",\n \"type\": \"Integer\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"image\",\n \"name\": \"Image\",\n \"type\": \"Link\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"linkType\": \"Asset\"\n }\n ]\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/entries?limit=1000&skip=0&locale=en-US", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"398347969e4449e3d1961eb7cbcafdad\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "8adf394b2b9f1a91ac30a24805c5bdf4", + "Content-Length": "2079", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:17 GMT", + "Via": "1.1 varnish", + "Age": "165", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1528-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098517.219795,VS0,VE7", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 10,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.171Z\",\n \"updatedAt\": \"2013-11-18T15:58:02.018Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Happy Cat\",\n \"likes\": [\n \"cheezburger\"\n ],\n \"color\": \"gray\",\n \"bestFriend\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"nyancat\"\n }\n },\n \"birthday\": \"2003-10-28T23:00:00+00:00\",\n \"lives\": 1,\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"happycat\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"6KntaYXaHSyIw8M6eo26OK\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-11-06T09:45:27.475Z\",\n \"updatedAt\": \"2013-11-18T09:13:37.808Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Doge\",\n \"description\": \"such json\\nwow\",\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"ge1xHyH3QOWucKWCCAgIG\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:23.210Z\",\n \"updatedAt\": \"2014-02-21T13:43:23.210Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Paris\",\n \"center\": {\n \"lon\": 2.3522219000000177,\n \"lat\": 48.856614\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:22.096Z\",\n \"updatedAt\": \"2013-12-18T13:10:26.212Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Jake\",\n \"description\": \"Bacon pancakes, makin' bacon pancakes!\",\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"jake\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"finn\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:21.450Z\",\n \"updatedAt\": \"2013-09-09T16:15:01.297Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"human\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Finn\",\n \"description\": \"Fearless adventurer! Defender of pancakes.\",\n \"likes\": [\n \"adventure\"\n ]\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"5ETMRzkl9KM4omyMwKAOki\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:57.752Z\",\n \"updatedAt\": \"2014-08-23T14:42:35.207Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 3,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"London\",\n \"center\": {\n \"lon\": -0.12548719999995228,\n \"lat\": 51.508515\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"garfield\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.821Z\",\n \"updatedAt\": \"2013-08-27T10:09:07.929Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Garfield\",\n \"likes\": [\n \"lasagna\"\n ],\n \"color\": \"orange\",\n \"birthday\": \"1979-06-18T23:00:00+00:00\",\n \"lifes\": null,\n \"lives\": 9\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:19.513Z\",\n \"updatedAt\": \"2013-09-04T09:19:39.027Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Nyan Cat\",\n \"likes\": [\n \"rainbows\",\n \"fish\"\n ],\n \"color\": \"rainbow\",\n \"bestFriend\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"happycat\"\n }\n },\n \"birthday\": \"2011-04-04T22:00:00+00:00\",\n \"lives\": 1337,\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"nyancat\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"4MU1s3potiUEM2G4okYOqw\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:45.926Z\",\n \"updatedAt\": \"2014-02-21T13:42:45.926Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Berlin\",\n \"center\": {\n \"lon\": 13.404953999999975,\n \"lat\": 52.52000659999999\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"7qVBlCjpWE86Oseo40gAEY\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:38.258Z\",\n \"updatedAt\": \"2014-04-15T08:22:22.010Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"San Francisco\",\n \"center\": {\n \"lon\": -122.41941550000001,\n \"lat\": 37.7749295\n }\n }\n }\n ],\n \"includes\": {\n \"Asset\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Doge\",\n \"description\": \"nice picture\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Happy Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Jake\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Nyan Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n ]\n }\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/entries?limit=1000&skip=0&locale=tlh", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"64d3aec39b46347fc2919f63f284c2a7\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "7d68fd9979b42cf242fa61773e9251a4", + "Content-Length": "2088", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:17 GMT", + "Via": "1.1 varnish", + "Age": "165", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1521-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098517.358862,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 10,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.171Z\",\n \"updatedAt\": \"2013-11-18T15:58:02.018Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Quch vIghro'\",\n \"likes\": [\n \"cheezburger\"\n ],\n \"color\": \"gray\",\n \"bestFriend\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"nyancat\"\n }\n },\n \"birthday\": \"2003-10-28T23:00:00+00:00\",\n \"lives\": 1,\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"happycat\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"6KntaYXaHSyIw8M6eo26OK\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-11-06T09:45:27.475Z\",\n \"updatedAt\": \"2013-11-18T09:13:37.808Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Doge\",\n \"description\": \"such json\\nwow\",\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"ge1xHyH3QOWucKWCCAgIG\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:23.210Z\",\n \"updatedAt\": \"2014-02-21T13:43:23.210Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Paris\",\n \"center\": {\n \"lon\": 2.3522219000000177,\n \"lat\": 48.856614\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:22.096Z\",\n \"updatedAt\": \"2013-12-18T13:10:26.212Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Jake\",\n \"description\": \"Bacon pancakes, makin' bacon pancakes!\",\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"jake\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"finn\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:21.450Z\",\n \"updatedAt\": \"2013-09-09T16:15:01.297Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"human\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Finn\",\n \"description\": \"Fearless adventurer! Defender of pancakes.\",\n \"likes\": [\n \"adventure\"\n ]\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"5ETMRzkl9KM4omyMwKAOki\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:57.752Z\",\n \"updatedAt\": \"2014-08-23T14:42:35.207Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 3,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"London\",\n \"center\": {\n \"lon\": -0.12548719999995228,\n \"lat\": 51.508515\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"garfield\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.821Z\",\n \"updatedAt\": \"2013-08-27T10:09:07.929Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Garfield\",\n \"likes\": [\n \"lasagna\"\n ],\n \"color\": \"orange\",\n \"birthday\": \"1979-06-18T23:00:00+00:00\",\n \"lifes\": null,\n \"lives\": 9\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:19.513Z\",\n \"updatedAt\": \"2013-09-04T09:19:39.027Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Nyan vIghro'\",\n \"likes\": [\n \"rainbows\",\n \"fish\"\n ],\n \"color\": \"rainbow\",\n \"bestFriend\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"happycat\"\n }\n },\n \"birthday\": \"2011-04-04T22:00:00+00:00\",\n \"lives\": 1337,\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"nyancat\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"4MU1s3potiUEM2G4okYOqw\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:45.926Z\",\n \"updatedAt\": \"2014-02-21T13:42:45.926Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Berlin\",\n \"center\": {\n \"lon\": 13.404953999999975,\n \"lat\": 52.52000659999999\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"7qVBlCjpWE86Oseo40gAEY\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:38.258Z\",\n \"updatedAt\": \"2014-04-15T08:22:22.010Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"San Francisco\",\n \"center\": {\n \"lon\": -122.41941550000001,\n \"lat\": 37.7749295\n }\n }\n }\n ],\n \"includes\": {\n \"Asset\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Doge\",\n \"description\": \"nice picture\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Happy Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Jake\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Nyan Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n ]\n }\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/entries?limit=1000&skip=0&locale=%2A", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"a92738013aa396abb47a82b1bd37096f\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "e3d0b6e56dde9c59ce9cbb0439935c2f", + "Content-Length": "2233", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:17 GMT", + "Via": "1.1 varnish", + "Age": "164", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1548-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098518.510518,VS0,VE0", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 10,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.171Z\",\n \"updatedAt\": \"2013-11-18T15:58:02.018Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Happy Cat\",\n \"tlh\": \"Quch vIghro'\"\n },\n \"likes\": {\n \"en-US\": [\n \"cheezburger\"\n ]\n },\n \"color\": {\n \"en-US\": \"gray\"\n },\n \"bestFriend\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"nyancat\"\n }\n }\n },\n \"birthday\": {\n \"en-US\": \"2003-10-28T23:00:00+00:00\"\n },\n \"lives\": {\n \"en-US\": 1\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"happycat\"\n }\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"6KntaYXaHSyIw8M6eo26OK\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-11-06T09:45:27.475Z\",\n \"updatedAt\": \"2013-11-18T09:13:37.808Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Doge\"\n },\n \"description\": {\n \"en-US\": \"such json\\nwow\"\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\"\n }\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"ge1xHyH3QOWucKWCCAgIG\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:23.210Z\",\n \"updatedAt\": \"2014-02-21T13:43:23.210Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Paris\"\n },\n \"center\": {\n \"en-US\": {\n \"lon\": 2.3522219000000177,\n \"lat\": 48.856614\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:22.096Z\",\n \"updatedAt\": \"2013-12-18T13:10:26.212Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Jake\"\n },\n \"description\": {\n \"en-US\": \"Bacon pancakes, makin' bacon pancakes!\"\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"jake\"\n }\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"finn\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:21.450Z\",\n \"updatedAt\": \"2013-09-09T16:15:01.297Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"human\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Finn\"\n },\n \"description\": {\n \"en-US\": \"Fearless adventurer! Defender of pancakes.\"\n },\n \"likes\": {\n \"en-US\": [\n \"adventure\"\n ]\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"5ETMRzkl9KM4omyMwKAOki\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:57.752Z\",\n \"updatedAt\": \"2014-08-23T14:42:35.207Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 3,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"London\"\n },\n \"center\": {\n \"en-US\": {\n \"lon\": -0.12548719999995228,\n \"lat\": 51.508515\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"garfield\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.821Z\",\n \"updatedAt\": \"2013-08-27T10:09:07.929Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Garfield\",\n \"tlh\": \"Garfield\"\n },\n \"likes\": {\n \"en-US\": [\n \"lasagna\"\n ]\n },\n \"color\": {\n \"en-US\": \"orange\"\n },\n \"birthday\": {\n \"en-US\": \"1979-06-18T23:00:00+00:00\"\n },\n \"lifes\": {\n \"en-US\": null\n },\n \"lives\": {\n \"en-US\": 9\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:19.513Z\",\n \"updatedAt\": \"2013-09-04T09:19:39.027Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Nyan Cat\",\n \"tlh\": \"Nyan vIghro'\"\n },\n \"likes\": {\n \"en-US\": [\n \"rainbows\",\n \"fish\"\n ]\n },\n \"color\": {\n \"en-US\": \"rainbow\"\n },\n \"bestFriend\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"happycat\"\n }\n }\n },\n \"birthday\": {\n \"en-US\": \"2011-04-04T22:00:00+00:00\"\n },\n \"lives\": {\n \"en-US\": 1337\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"nyancat\"\n }\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"4MU1s3potiUEM2G4okYOqw\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:45.926Z\",\n \"updatedAt\": \"2014-02-21T13:42:45.926Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Berlin\"\n },\n \"center\": {\n \"en-US\": {\n \"lon\": 13.404953999999975,\n \"lat\": 52.52000659999999\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"7qVBlCjpWE86Oseo40gAEY\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:38.258Z\",\n \"updatedAt\": \"2014-04-15T08:22:22.010Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"San Francisco\"\n },\n \"center\": {\n \"en-US\": {\n \"lon\": -122.41941550000001,\n \"lat\": 37.7749295\n }\n }\n }\n }\n ],\n \"includes\": {\n \"Asset\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Doge\"\n },\n \"description\": {\n \"en-US\": \"nice picture\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Happy Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Jake\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Nyan Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n }\n ]\n }\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/assets?limit=1000&skip=0&locale=en-US", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"a9f53f29fa3a950e0004c0db9a3444ac\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "7b136ddc531ed651537323b5d8081f41", + "Content-Length": "872", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:17 GMT", + "Via": "1.1 varnish", + "Age": "164", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1522-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098518.661695,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 4,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Nyan Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Doge\",\n \"description\": \"nice picture\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Jake\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Happy Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/assets?limit=1000&skip=0&locale=tlh", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"d2522b3d85c488cd5d692c136ff4d8aa\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "cfdba2f5182c758259d13a94b243ee8a", + "Content-Length": "870", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:17 GMT", + "Via": "1.1 varnish", + "Age": "164", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1526-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098518.819834,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 4,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Nyan Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Doge\",\n \"description\": \"nice picture\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Jake\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Happy Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/assets?limit=1000&skip=0&locale=%2A", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"c4877c403ffdfca7827179dbdfbc68e6\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "80d014ef2a8fc5cbf0353aaf2cd790f8", + "Content-Length": "892", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:15:17 GMT", + "Via": "1.1 varnish", + "Age": "164", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1549-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098518.972324,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 4,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Nyan Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Doge\"\n },\n \"description\": {\n \"en-US\": \"nice picture\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Jake\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Happy Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n }\n ]\n}\n" + } +}] \ No newline at end of file diff --git a/tests/Recordings/e2e_console_cache_warmup_with_content.json b/tests/Recordings/e2e_console_cache_warmup_with_content.json new file mode 100644 index 00000000..c055a0a2 --- /dev/null +++ b/tests/Recordings/e2e_console_cache_warmup_with_content.json @@ -0,0 +1,431 @@ +[{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "\"17f6b9f68596176aed46fa020bf235af\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "69495988224e7ba3d22dafdbf3de5c8e", + "Content-Length": "344", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:30 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1545-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098350.490987,VS0,VE313", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Space\",\n \"id\": \"cfexampleapi\"\n },\n \"name\": \"Contentful Example API\",\n \"locales\": [\n {\n \"code\": \"en-US\",\n \"default\": true,\n \"name\": \"English\",\n \"fallbackCode\": null\n },\n {\n \"code\": \"tlh\",\n \"default\": false,\n \"name\": \"Klingon\",\n \"fallbackCode\": \"en-US\"\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/locales", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "\"028bb030b13282c4390f03bf31ad99f8\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "e3b9c74dd32b2f975f8e3ab67e51c795", + "Content-Length": "546", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:31 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1551-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535098351.949055,VS0,VE334", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 2,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"code\": \"en-US\",\n \"name\": \"English\",\n \"default\": true,\n \"fallbackCode\": null,\n \"sys\": {\n \"id\": \"2oQPjMCL9bQkylziydLh57\",\n \"type\": \"Locale\",\n \"version\": 1\n }\n },\n {\n \"code\": \"tlh\",\n \"name\": \"Klingon\",\n \"default\": false,\n \"fallbackCode\": \"en-US\",\n \"sys\": {\n \"id\": \"3zpZmkZrHTIekHmXgflXaV\",\n \"type\": \"Locale\",\n \"version\": 0\n }\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/content_types?limit=100", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"bf828301773429a5af61a14da8e539aa\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "62d63ab5d38991dff18ea0a187962762", + "Content-Length": "914", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:31 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1529-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535098352.581303,VS0,VE366", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 4,\n \"skip\": 0,\n \"limit\": 100,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"dog\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2013-06-27T22:46:13.498Z\",\n \"updatedAt\": \"2013-09-02T14:32:11.837Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"displayField\": \"name\",\n \"name\": \"Dog\",\n \"description\": \"Bark!\",\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"description\",\n \"name\": \"Description\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"image\",\n \"name\": \"Image\",\n \"type\": \"Link\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"linkType\": \"Asset\"\n }\n ]\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2014-02-21T13:42:33.009Z\",\n \"updatedAt\": \"2014-02-21T13:42:33.009Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1\n },\n \"displayField\": \"name\",\n \"name\": \"City\",\n \"description\": null,\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"center\",\n \"name\": \"Center\",\n \"type\": \"Location\",\n \"localized\": false,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n }\n ]\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"human\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2013-06-27T22:46:14.133Z\",\n \"updatedAt\": \"2013-09-02T15:10:26.818Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 3\n },\n \"displayField\": \"name\",\n \"name\": \"Human\",\n \"description\": null,\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"description\",\n \"name\": \"Description\",\n \"type\": \"Text\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"likes\",\n \"name\": \"Likes\",\n \"type\": \"Array\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"items\": {\n \"type\": \"Symbol\",\n \"validations\": []\n }\n },\n {\n \"id\": \"image\",\n \"name\": \"Image\",\n \"type\": \"Array\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": true,\n \"omitted\": false,\n \"items\": {\n \"type\": \"Link\",\n \"validations\": [],\n \"linkType\": \"Asset\"\n }\n }\n ]\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"cat\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2013-06-27T22:46:12.852Z\",\n \"updatedAt\": \"2017-07-06T09:58:52.691Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8\n },\n \"displayField\": \"name\",\n \"name\": \"Cat\",\n \"description\": \"Meow.\",\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": true,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"likes\",\n \"name\": \"Likes\",\n \"type\": \"Array\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"items\": {\n \"type\": \"Symbol\",\n \"validations\": []\n }\n },\n {\n \"id\": \"color\",\n \"name\": \"Color\",\n \"type\": \"Symbol\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"bestFriend\",\n \"name\": \"Best Friend\",\n \"type\": \"Link\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"linkType\": \"Entry\"\n },\n {\n \"id\": \"birthday\",\n \"name\": \"Birthday\",\n \"type\": \"Date\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"lifes\",\n \"name\": \"Lifes left\",\n \"type\": \"Integer\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": true,\n \"omitted\": false\n },\n {\n \"id\": \"lives\",\n \"name\": \"Lives left\",\n \"type\": \"Integer\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"image\",\n \"name\": \"Image\",\n \"type\": \"Link\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"linkType\": \"Asset\"\n }\n ]\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/entries?limit=1000&skip=0&locale=en-US", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"398347969e4449e3d1961eb7cbcafdad\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "8adf394b2b9f1a91ac30a24805c5bdf4", + "Content-Length": "2079", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:32 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1520-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535098352.182103,VS0,VE208", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 10,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.171Z\",\n \"updatedAt\": \"2013-11-18T15:58:02.018Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Happy Cat\",\n \"likes\": [\n \"cheezburger\"\n ],\n \"color\": \"gray\",\n \"bestFriend\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"nyancat\"\n }\n },\n \"birthday\": \"2003-10-28T23:00:00+00:00\",\n \"lives\": 1,\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"happycat\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"6KntaYXaHSyIw8M6eo26OK\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-11-06T09:45:27.475Z\",\n \"updatedAt\": \"2013-11-18T09:13:37.808Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Doge\",\n \"description\": \"such json\\nwow\",\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"ge1xHyH3QOWucKWCCAgIG\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:23.210Z\",\n \"updatedAt\": \"2014-02-21T13:43:23.210Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Paris\",\n \"center\": {\n \"lon\": 2.3522219000000177,\n \"lat\": 48.856614\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:22.096Z\",\n \"updatedAt\": \"2013-12-18T13:10:26.212Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Jake\",\n \"description\": \"Bacon pancakes, makin' bacon pancakes!\",\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"jake\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"finn\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:21.450Z\",\n \"updatedAt\": \"2013-09-09T16:15:01.297Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"human\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Finn\",\n \"description\": \"Fearless adventurer! Defender of pancakes.\",\n \"likes\": [\n \"adventure\"\n ]\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"5ETMRzkl9KM4omyMwKAOki\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:57.752Z\",\n \"updatedAt\": \"2014-08-23T14:42:35.207Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 3,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"London\",\n \"center\": {\n \"lon\": -0.12548719999995228,\n \"lat\": 51.508515\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"garfield\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.821Z\",\n \"updatedAt\": \"2013-08-27T10:09:07.929Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Garfield\",\n \"likes\": [\n \"lasagna\"\n ],\n \"color\": \"orange\",\n \"birthday\": \"1979-06-18T23:00:00+00:00\",\n \"lifes\": null,\n \"lives\": 9\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:19.513Z\",\n \"updatedAt\": \"2013-09-04T09:19:39.027Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Nyan Cat\",\n \"likes\": [\n \"rainbows\",\n \"fish\"\n ],\n \"color\": \"rainbow\",\n \"bestFriend\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"happycat\"\n }\n },\n \"birthday\": \"2011-04-04T22:00:00+00:00\",\n \"lives\": 1337,\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"nyancat\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"4MU1s3potiUEM2G4okYOqw\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:45.926Z\",\n \"updatedAt\": \"2014-02-21T13:42:45.926Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"Berlin\",\n \"center\": {\n \"lon\": 13.404953999999975,\n \"lat\": 52.52000659999999\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"7qVBlCjpWE86Oseo40gAEY\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:38.258Z\",\n \"updatedAt\": \"2014-04-15T08:22:22.010Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"name\": \"San Francisco\",\n \"center\": {\n \"lon\": -122.41941550000001,\n \"lat\": 37.7749295\n }\n }\n }\n ],\n \"includes\": {\n \"Asset\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Doge\",\n \"description\": \"nice picture\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Happy Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Jake\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Nyan Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n ]\n }\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/entries?limit=1000&skip=0&locale=tlh", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"64d3aec39b46347fc2919f63f284c2a7\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "7d68fd9979b42cf242fa61773e9251a4", + "Content-Length": "2088", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:32 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1530-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535098353.531676,VS0,VE171", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 10,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.171Z\",\n \"updatedAt\": \"2013-11-18T15:58:02.018Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Quch vIghro'\",\n \"likes\": [\n \"cheezburger\"\n ],\n \"color\": \"gray\",\n \"bestFriend\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"nyancat\"\n }\n },\n \"birthday\": \"2003-10-28T23:00:00+00:00\",\n \"lives\": 1,\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"happycat\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"6KntaYXaHSyIw8M6eo26OK\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-11-06T09:45:27.475Z\",\n \"updatedAt\": \"2013-11-18T09:13:37.808Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Doge\",\n \"description\": \"such json\\nwow\",\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"ge1xHyH3QOWucKWCCAgIG\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:23.210Z\",\n \"updatedAt\": \"2014-02-21T13:43:23.210Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Paris\",\n \"center\": {\n \"lon\": 2.3522219000000177,\n \"lat\": 48.856614\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:22.096Z\",\n \"updatedAt\": \"2013-12-18T13:10:26.212Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Jake\",\n \"description\": \"Bacon pancakes, makin' bacon pancakes!\",\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"jake\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"finn\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:21.450Z\",\n \"updatedAt\": \"2013-09-09T16:15:01.297Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"human\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Finn\",\n \"description\": \"Fearless adventurer! Defender of pancakes.\",\n \"likes\": [\n \"adventure\"\n ]\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"5ETMRzkl9KM4omyMwKAOki\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:57.752Z\",\n \"updatedAt\": \"2014-08-23T14:42:35.207Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 3,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"London\",\n \"center\": {\n \"lon\": -0.12548719999995228,\n \"lat\": 51.508515\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"garfield\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.821Z\",\n \"updatedAt\": \"2013-08-27T10:09:07.929Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Garfield\",\n \"likes\": [\n \"lasagna\"\n ],\n \"color\": \"orange\",\n \"birthday\": \"1979-06-18T23:00:00+00:00\",\n \"lifes\": null,\n \"lives\": 9\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:19.513Z\",\n \"updatedAt\": \"2013-09-04T09:19:39.027Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Nyan vIghro'\",\n \"likes\": [\n \"rainbows\",\n \"fish\"\n ],\n \"color\": \"rainbow\",\n \"bestFriend\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"happycat\"\n }\n },\n \"birthday\": \"2011-04-04T22:00:00+00:00\",\n \"lives\": 1337,\n \"image\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"nyancat\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"4MU1s3potiUEM2G4okYOqw\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:45.926Z\",\n \"updatedAt\": \"2014-02-21T13:42:45.926Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"Berlin\",\n \"center\": {\n \"lon\": 13.404953999999975,\n \"lat\": 52.52000659999999\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"7qVBlCjpWE86Oseo40gAEY\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:38.258Z\",\n \"updatedAt\": \"2014-04-15T08:22:22.010Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n },\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"name\": \"San Francisco\",\n \"center\": {\n \"lon\": -122.41941550000001,\n \"lat\": 37.7749295\n }\n }\n }\n ],\n \"includes\": {\n \"Asset\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Doge\",\n \"description\": \"nice picture\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Happy Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Jake\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Nyan Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n ]\n }\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/entries?limit=1000&skip=0&locale=%2A", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"a92738013aa396abb47a82b1bd37096f\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "e3d0b6e56dde9c59ce9cbb0439935c2f", + "Content-Length": "2233", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:33 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1533-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535098353.844774,VS0,VE292", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 10,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.171Z\",\n \"updatedAt\": \"2013-11-18T15:58:02.018Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Happy Cat\",\n \"tlh\": \"Quch vIghro'\"\n },\n \"likes\": {\n \"en-US\": [\n \"cheezburger\"\n ]\n },\n \"color\": {\n \"en-US\": \"gray\"\n },\n \"bestFriend\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"nyancat\"\n }\n }\n },\n \"birthday\": {\n \"en-US\": \"2003-10-28T23:00:00+00:00\"\n },\n \"lives\": {\n \"en-US\": 1\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"happycat\"\n }\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"6KntaYXaHSyIw8M6eo26OK\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-11-06T09:45:27.475Z\",\n \"updatedAt\": \"2013-11-18T09:13:37.808Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Doge\"\n },\n \"description\": {\n \"en-US\": \"such json\\nwow\"\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\"\n }\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"ge1xHyH3QOWucKWCCAgIG\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:23.210Z\",\n \"updatedAt\": \"2014-02-21T13:43:23.210Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Paris\"\n },\n \"center\": {\n \"en-US\": {\n \"lon\": 2.3522219000000177,\n \"lat\": 48.856614\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:22.096Z\",\n \"updatedAt\": \"2013-12-18T13:10:26.212Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"dog\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Jake\"\n },\n \"description\": {\n \"en-US\": \"Bacon pancakes, makin' bacon pancakes!\"\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"jake\"\n }\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"finn\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:21.450Z\",\n \"updatedAt\": \"2013-09-09T16:15:01.297Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"human\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Finn\"\n },\n \"description\": {\n \"en-US\": \"Fearless adventurer! Defender of pancakes.\"\n },\n \"likes\": {\n \"en-US\": [\n \"adventure\"\n ]\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"5ETMRzkl9KM4omyMwKAOki\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:57.752Z\",\n \"updatedAt\": \"2014-08-23T14:42:35.207Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 3,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"London\"\n },\n \"center\": {\n \"en-US\": {\n \"lon\": -0.12548719999995228,\n \"lat\": 51.508515\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"garfield\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:20.821Z\",\n \"updatedAt\": \"2013-08-27T10:09:07.929Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Garfield\",\n \"tlh\": \"Garfield\"\n },\n \"likes\": {\n \"en-US\": [\n \"lasagna\"\n ]\n },\n \"color\": {\n \"en-US\": \"orange\"\n },\n \"birthday\": {\n \"en-US\": \"1979-06-18T23:00:00+00:00\"\n },\n \"lifes\": {\n \"en-US\": null\n },\n \"lives\": {\n \"en-US\": 9\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:19.513Z\",\n \"updatedAt\": \"2013-09-04T09:19:39.027Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Nyan Cat\",\n \"tlh\": \"Nyan vIghro'\"\n },\n \"likes\": {\n \"en-US\": [\n \"rainbows\",\n \"fish\"\n ]\n },\n \"color\": {\n \"en-US\": \"rainbow\"\n },\n \"bestFriend\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"happycat\"\n }\n }\n },\n \"birthday\": {\n \"en-US\": \"2011-04-04T22:00:00+00:00\"\n },\n \"lives\": {\n \"en-US\": 1337\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"nyancat\"\n }\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"4MU1s3potiUEM2G4okYOqw\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:42:45.926Z\",\n \"updatedAt\": \"2014-02-21T13:42:45.926Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Berlin\"\n },\n \"center\": {\n \"en-US\": {\n \"lon\": 13.404953999999975,\n \"lat\": 52.52000659999999\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"7qVBlCjpWE86Oseo40gAEY\",\n \"type\": \"Entry\",\n \"createdAt\": \"2014-02-21T13:43:38.258Z\",\n \"updatedAt\": \"2014-04-15T08:22:22.010Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"1t9IbcfdCk6m04uISSsaIK\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"San Francisco\"\n },\n \"center\": {\n \"en-US\": {\n \"lon\": -122.41941550000001,\n \"lat\": 37.7749295\n }\n }\n }\n }\n ],\n \"includes\": {\n \"Asset\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Doge\"\n },\n \"description\": {\n \"en-US\": \"nice picture\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Happy Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Jake\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Nyan Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n }\n ]\n }\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/assets?limit=1000&skip=0&locale=en-US", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"a9f53f29fa3a950e0004c0db9a3444ac\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "7b136ddc531ed651537323b5d8081f41", + "Content-Length": "872", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:33 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1546-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535098353.441641,VS0,VE156", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 4,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Nyan Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Doge\",\n \"description\": \"nice picture\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Jake\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"en-US\"\n },\n \"fields\": {\n \"title\": \"Happy Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/assets?limit=1000&skip=0&locale=tlh", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"d2522b3d85c488cd5d692c136ff4d8aa\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "cfdba2f5182c758259d13a94b243ee8a", + "Content-Length": "870", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:33 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1531-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535098354.748618,VS0,VE224", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 4,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Nyan Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Doge\",\n \"description\": \"nice picture\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Jake\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2,\n \"locale\": \"tlh\"\n },\n \"fields\": {\n \"title\": \"Happy Cat\",\n \"file\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/assets?limit=1000&skip=0&locale=%2A", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"c4877c403ffdfca7827179dbdfbc68e6\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "80d014ef2a8fc5cbf0353aaf2cd790f8", + "Content-Length": "892", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:12:34 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1522-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535098354.122095,VS0,VE327", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 4,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Nyan Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"1x0xpXu4pSGS4OukSyWGUK\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-11-06T09:45:10.000Z\",\n \"updatedAt\": \"2013-12-18T13:27:14.917Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 6\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Doge\"\n },\n \"description\": {\n \"en-US\": \"nice picture\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/1x0xpXu4pSGS4OukSyWGUK\/cc1239c6385428ef26f4180190532818\/doge.jpg\",\n \"details\": {\n \"size\": 522943,\n \"image\": {\n \"width\": 5800,\n \"height\": 4350\n }\n },\n \"fileName\": \"doge.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"jake\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.260Z\",\n \"updatedAt\": \"2013-09-02T15:22:39.466Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Jake\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4hlteQAXS8iS0YCMU6QMWg\/2a4d826144f014109364ccf5c891d2dd\/jake.png\",\n \"details\": {\n \"size\": 20480,\n \"image\": {\n \"width\": 100,\n \"height\": 161\n }\n },\n \"fileName\": \"jake.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n },\n {\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"happycat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.267Z\",\n \"updatedAt\": \"2013-09-02T15:11:24.361Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 2\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Happy Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/3MZPnjZTIskAIIkuuosCss\/382a48dfa2cb16c47aa2c72f7b23bf09\/happycatw.jpg\",\n \"details\": {\n \"size\": 59939,\n \"image\": {\n \"width\": 273,\n \"height\": 397\n }\n },\n \"fileName\": \"happycatw.jpg\",\n \"contentType\": \"image\/jpeg\"\n }\n }\n }\n }\n ]\n}\n" + } +}] \ No newline at end of file From 3a4fe10617ae9a5173320778bd8eb886fc36692c Mon Sep 17 00:00:00 2001 From: Davide Borsatto Date: Fri, 24 Aug 2018 10:41:57 +0200 Subject: [PATCH 2/3] feat(cache): Add ability to cache entries and assets at runtime --- src/Client.php | 15 +- src/InstanceRepository.php | 9 +- tests/E2E/CacheTest.php | 49 +++- ...ed_autowarmup_with_entries_and_assets.json | 238 ++++++++++++++++++ tests/TestCase.php | 2 + 5 files changed, 303 insertions(+), 10 deletions(-) create mode 100644 tests/Recordings/e2e_cache_access_cached_autowarmup_with_entries_and_assets.json diff --git a/src/Client.php b/src/Client.php index 33ac05e0..b7444c89 100644 --- a/src/Client.php +++ b/src/Client.php @@ -108,11 +108,12 @@ class Client extends BaseClient * string, e.g. "en-US" to fetch content in that locale. Set it to "*" * to fetch content in all locales. * @param array $options An array of optional configuration. The following options are available: - * * guzzle Override the guzzle instance used by the Contentful client - * * logger A PSR-3 logger - * * baseUri Override the uri that is used to connect to the Contentful API (e.g. 'https://cdn.contentful.com/'). - * * cache Null or a PSR-6 cache item pool. The client only writes to the cache if autoWarmup is true, otherwise, you are responsible for warming it up using \Contentful\Delivery\Cache\CacheWarmer. - * * autoWarmup Warm up the cache automatically + * * guzzle Override the guzzle instance used by the Contentful client + * * logger A PSR-3 logger + * * baseUri Override the uri that is used to connect to the Contentful API (e.g. 'https://cdn.contentful.com/'). + * * cache Null or a PSR-6 cache item pool. The client only writes to the cache if autoWarmup is true, otherwise, you are responsible for warming it up using \Contentful\Delivery\Cache\CacheWarmer. + * * autoWarmup Warm up the cache automatically for content types and locales + * * cacheContent Warm up the cache automatically for entries and assets (requires autoWarmup to also be set to true) */ public function __construct($token, $spaceId, $environmentId = 'master', $preview = false, $defaultLocale = null, array $options = []) { @@ -122,6 +123,7 @@ public function __construct($token, $spaceId, $environmentId = 'master', $previe 'baseUri' => null, 'cache' => null, 'autoWarmup' => false, + 'cacheContent' => false, ], $options); $baseUri = $preview ? self::URI_PREVIEW : self::URI_DELIVERY; @@ -150,7 +152,8 @@ public function __construct($token, $spaceId, $environmentId = 'master', $previe $cacheItemPool, (bool) $options['autoWarmup'], $this->spaceId, - $this->environmentId + $this->environmentId, + (bool) $options['cacheContent'] ); $this->builder = new ResourceBuilder($this, $this->instanceRepository); $this->scopedJsonDecoder = new ScopedJsonDecoder($this->spaceId, $this->environmentId); diff --git a/src/InstanceRepository.php b/src/InstanceRepository.php index 87f30401..f3699813 100644 --- a/src/InstanceRepository.php +++ b/src/InstanceRepository.php @@ -80,13 +80,15 @@ class InstanceRepository * @param bool $autoWarmup * @param string $spaceId * @param string $environmentId + * @param bool $cacheContent */ public function __construct( Client $client, CacheItemPoolInterface $cacheItemPool, $autoWarmup, $spaceId, - $environmentId + $environmentId, + $cacheContent = false ) { $this->client = $client; $this->api = $client->getApi(); @@ -94,6 +96,11 @@ public function __construct( $this->autoWarmup = $autoWarmup; $this->spaceId = $spaceId; $this->environmentId = $environmentId; + + if ($cacheContent) { + self::$warmupTypes[] = 'Entry'; + self::$warmupTypes[] = 'Asset'; + } } /** diff --git a/tests/E2E/CacheTest.php b/tests/E2E/CacheTest.php index bcc00290..334a3f55 100644 --- a/tests/E2E/CacheTest.php +++ b/tests/E2E/CacheTest.php @@ -12,6 +12,7 @@ use Contentful\Delivery\Cache\CacheClearer; use Contentful\Delivery\Cache\CacheWarmer; use Contentful\Tests\Delivery\TestCase; +use function GuzzleHttp\json_decode as guzzle_json_decode; class CacheTest extends TestCase { @@ -35,7 +36,7 @@ public function testCacheWarmupClear() ); $this->assertTrue($cacheItem->isHit()); - $rawSpace = \json_decode($cacheItem->get(), true); + $rawSpace = guzzle_json_decode($cacheItem->get(), true); $this->assertSame('cfexampleapi', $rawSpace['sys']['id']); $clearer->clear(); @@ -97,8 +98,50 @@ public function testCachedContentAutoWarmup() $cacheItem = self::$cache->getItem($instanceRepository->generateCacheKey($client->getApi(), 'Space', 'cfexampleapi')); $this->assertTrue($cacheItem->isHit()); - $rawSpace = \json_decode($cacheItem->get(), true); - $this->assertSame('cfexampleapi', $rawSpace['sys']['id']); + $resource = guzzle_json_decode($cacheItem->get(), true); + $this->assertSame('cfexampleapi', $resource['sys']['id']); + + self::$cache->clear(); + } + + /** + * @vcr e2e_cache_access_cached_autowarmup_with_entries_and_assets.json + */ + public function testCachedContentAutoWarmupWithEntriesAndAssets() + { + self::$cache->clear(); + + $client = $this->getClient('cfexampleapi_cache_autowarmup_content'); + $instanceRepository = $client->getInstanceRepository(); + + $this->assertSame('cfexampleapi', $client->getSpace()->getId()); + $this->assertSame('cat', $client->getContentType('cat')->getId()); + $this->assertSame('nyancat', $client->getEntry('nyancat', '*')->getId()); + $this->assertSame('nyancat', $client->getAsset('nyancat', '*')->getId()); + + $cacheItem = self::$cache->getItem($instanceRepository->generateCacheKey($client->getApi(), 'Space', 'cfexampleapi')); + $this->assertTrue($cacheItem->isHit()); + $resource = guzzle_json_decode($cacheItem->get(), true); + $this->assertSame('cfexampleapi', $resource['sys']['id']); + $this->assertSame('Space', $resource['sys']['type']); + + $cacheItem = self::$cache->getItem($instanceRepository->generateCacheKey($client->getApi(), 'ContentType', 'cat')); + $this->assertTrue($cacheItem->isHit()); + $resource = guzzle_json_decode($cacheItem->get(), true); + $this->assertSame('cat', $resource['sys']['id']); + $this->assertSame('ContentType', $resource['sys']['type']); + + $cacheItem = self::$cache->getItem($instanceRepository->generateCacheKey($client->getApi(), 'Entry', 'nyancat')); + $this->assertTrue($cacheItem->isHit()); + $resource = guzzle_json_decode($cacheItem->get(), true); + $this->assertSame('nyancat', $resource['sys']['id']); + $this->assertSame('Entry', $resource['sys']['type']); + + $cacheItem = self::$cache->getItem($instanceRepository->generateCacheKey($client->getApi(), 'Asset', 'nyancat')); + $this->assertTrue($cacheItem->isHit()); + $resource = guzzle_json_decode($cacheItem->get(), true); + $this->assertSame('nyancat', $resource['sys']['id']); + $this->assertSame('Asset', $resource['sys']['type']); self::$cache->clear(); } diff --git a/tests/Recordings/e2e_cache_access_cached_autowarmup_with_entries_and_assets.json b/tests/Recordings/e2e_cache_access_cached_autowarmup_with_entries_and_assets.json new file mode 100644 index 00000000..d2c82933 --- /dev/null +++ b/tests/Recordings/e2e_cache_access_cached_autowarmup_with_entries_and_assets.json @@ -0,0 +1,238 @@ +[{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "\"17f6b9f68596176aed46fa020bf235af\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "69495988224e7ba3d22dafdbf3de5c8e", + "Content-Length": "344", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:36:32 GMT", + "Via": "1.1 varnish", + "Age": "1442", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1535-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535099793.644961,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Space\",\n \"id\": \"cfexampleapi\"\n },\n \"name\": \"Contentful Example API\",\n \"locales\": [\n {\n \"code\": \"en-US\",\n \"default\": true,\n \"name\": \"English\",\n \"fallbackCode\": null\n },\n {\n \"code\": \"tlh\",\n \"default\": false,\n \"name\": \"Klingon\",\n \"fallbackCode\": \"en-US\"\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/content_types\/cat", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"2a2927d9ba7bed0521e40d679b44ce38\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "1a9f0068831650aa4e3c715ae9b8b286", + "Content-Length": "544", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:36:33 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1550-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535099793.759753,VS0,VE419", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"cat\",\n \"type\": \"ContentType\",\n \"createdAt\": \"2013-06-27T22:46:12.852Z\",\n \"updatedAt\": \"2017-07-06T09:58:52.691Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 8\n },\n \"displayField\": \"name\",\n \"name\": \"Cat\",\n \"description\": \"Meow.\",\n \"fields\": [\n {\n \"id\": \"name\",\n \"name\": \"Name\",\n \"type\": \"Text\",\n \"localized\": true,\n \"required\": true,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"likes\",\n \"name\": \"Likes\",\n \"type\": \"Array\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"items\": {\n \"type\": \"Symbol\",\n \"validations\": []\n }\n },\n {\n \"id\": \"color\",\n \"name\": \"Color\",\n \"type\": \"Symbol\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"bestFriend\",\n \"name\": \"Best Friend\",\n \"type\": \"Link\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"linkType\": \"Entry\"\n },\n {\n \"id\": \"birthday\",\n \"name\": \"Birthday\",\n \"type\": \"Date\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"lifes\",\n \"name\": \"Lifes left\",\n \"type\": \"Integer\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": true,\n \"omitted\": false\n },\n {\n \"id\": \"lives\",\n \"name\": \"Lives left\",\n \"type\": \"Integer\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false\n },\n {\n \"id\": \"image\",\n \"name\": \"Image\",\n \"type\": \"Link\",\n \"localized\": false,\n \"required\": false,\n \"disabled\": false,\n \"omitted\": false,\n \"linkType\": \"Asset\"\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/entries\/nyancat?locale=%2A", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Encoding": "gzip", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "W\/\"b3a058364e0c61f43f431e6f72953875\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "21caabbc5d630c9380bdc86777f77172", + "Content-Length": "433", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:36:33 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1531-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535099793.322090,VS0,VE342", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Entry\",\n \"createdAt\": \"2013-06-27T22:46:19.513Z\",\n \"updatedAt\": \"2013-09-04T09:19:39.027Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 5,\n \"contentType\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"ContentType\",\n \"id\": \"cat\"\n }\n }\n },\n \"fields\": {\n \"name\": {\n \"en-US\": \"Nyan Cat\",\n \"tlh\": \"Nyan vIghro'\"\n },\n \"likes\": {\n \"en-US\": [\n \"rainbows\",\n \"fish\"\n ]\n },\n \"color\": {\n \"en-US\": \"rainbow\"\n },\n \"bestFriend\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Entry\",\n \"id\": \"happycat\"\n }\n }\n },\n \"birthday\": {\n \"en-US\": \"2011-04-04T22:00:00+00:00\"\n },\n \"lives\": {\n \"en-US\": 1337\n },\n \"image\": {\n \"en-US\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Asset\",\n \"id\": \"nyancat\"\n }\n }\n }\n }\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/locales", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "\"028bb030b13282c4390f03bf31ad99f8\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "e3b9c74dd32b2f975f8e3ab67e51c795", + "Content-Length": "546", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:36:33 GMT", + "Via": "1.1 varnish", + "Age": "1443", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1529-HHN", + "X-Cache": "HIT", + "X-Cache-Hits": "1", + "X-Timer": "S1535099794.802466,VS0,VE1", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"type\": \"Array\"\n },\n \"total\": 2,\n \"skip\": 0,\n \"limit\": 1000,\n \"items\": [\n {\n \"code\": \"en-US\",\n \"name\": \"English\",\n \"default\": true,\n \"fallbackCode\": null,\n \"sys\": {\n \"id\": \"2oQPjMCL9bQkylziydLh57\",\n \"type\": \"Locale\",\n \"version\": 1\n }\n },\n {\n \"code\": \"tlh\",\n \"name\": \"Klingon\",\n \"default\": false,\n \"fallbackCode\": \"en-US\",\n \"sys\": {\n \"id\": \"3zpZmkZrHTIekHmXgflXaV\",\n \"type\": \"Locale\",\n \"version\": 0\n }\n }\n ]\n}\n" + } +},{ + "request": { + "method": "GET", + "url": "https:\/\/cdn.contentful.com\/spaces\/cfexampleapi\/environments\/master\/assets\/nyancat?locale=%2A", + "headers": { + "Host": "cdn.contentful.com", + "User-Agent": "GuzzleHttp\/6.3.3 curl\/7.54.0 PHP\/7.2.9", + "X-Contentful-User-Agent": "sdk contentful.php\/3.4.0-dev; platform PHP\/7.2.9; os macOS;", + "Accept": "application\/vnd.contentful.delivery.v1+json", + "Accept-Encoding": "gzip", + "Authorization": "Bearer b4c0n73n7fu1" + } + }, + "response": { + "status": { + "http_version": "1.1", + "code": "200", + "message": "OK" + }, + "headers": { + "Access-Control-Allow-Headers": "Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature", + "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS", + "Access-Control-Allow-Origin": "*", + "Access-Control-Expose-Headers": "Etag", + "Access-Control-Max-Age": "86400", + "Cache-Control": "max-age=0", + "Content-Type": "application\/vnd.contentful.delivery.v1+json", + "Contentful-Api": "cda_cached", + "ETag": "\"638b9ba95ab8b4d066b86a81f9dcddac\"", + "Server": "Contentful", + "X-Content-Type-Options": "nosniff", + "X-Contentful-Region": "us-east-1", + "X-Contentful-Request-Id": "fde59c70e36606c7f261a27db1bf97f8", + "Content-Length": "901", + "Accept-Ranges": "bytes", + "Date": "Fri, 24 Aug 2018 08:36:34 GMT", + "Via": "1.1 varnish", + "Age": "0", + "Connection": "keep-alive", + "X-Served-By": "cache-hhn1537-HHN", + "X-Cache": "MISS", + "X-Cache-Hits": "0", + "X-Timer": "S1535099794.937436,VS0,VE328", + "Vary": "Accept-Encoding" + }, + "body": "{\n \"sys\": {\n \"space\": {\n \"sys\": {\n \"type\": \"Link\",\n \"linkType\": \"Space\",\n \"id\": \"cfexampleapi\"\n }\n },\n \"id\": \"nyancat\",\n \"type\": \"Asset\",\n \"createdAt\": \"2013-09-02T14:56:34.240Z\",\n \"updatedAt\": \"2013-09-02T14:56:34.240Z\",\n \"environment\": {\n \"sys\": {\n \"id\": \"master\",\n \"type\": \"Link\",\n \"linkType\": \"Environment\"\n }\n },\n \"revision\": 1\n },\n \"fields\": {\n \"title\": {\n \"en-US\": \"Nyan Cat\"\n },\n \"file\": {\n \"en-US\": {\n \"url\": \"\/\/images.ctfassets.net\/cfexampleapi\/4gp6taAwW4CmSgumq2ekUm\/9da0cd1936871b8d72343e895a00d611\/Nyan_cat_250px_frame.png\",\n \"details\": {\n \"size\": 12273,\n \"image\": {\n \"width\": 250,\n \"height\": 250\n }\n },\n \"fileName\": \"Nyan_cat_250px_frame.png\",\n \"contentType\": \"image\/png\"\n }\n }\n }\n}\n" + } +}] \ No newline at end of file diff --git a/tests/TestCase.php b/tests/TestCase.php index 5d135d2a..47fe11ff 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -47,6 +47,8 @@ protected function getClient($key) return new Client('b4c0n73n7fu1', 'cfexampleapi', 'master', false, null, \array_merge($options, ['cache' => self::$cache])); case 'cfexampleapi_cache_autowarmup': return new Client('b4c0n73n7fu1', 'cfexampleapi', 'master', false, null, \array_merge($options, ['cache' => self::$cache, 'autoWarmup' => true])); + case 'cfexampleapi_cache_autowarmup_content': + return new Client('b4c0n73n7fu1', 'cfexampleapi', 'master', false, null, \array_merge($options, ['cache' => self::$cache, 'autoWarmup' => true, 'cacheContent' => true])); case 'cfexampleapi_tlh': return new Client('b4c0n73n7fu1', 'cfexampleapi', 'master', false, 'tlh', $options); case 'cfexampleapi_invalid': From 0ca5dd3daa0c4cb5dab478a2e0e04f3e87a7e0ff Mon Sep 17 00:00:00 2001 From: Davide Borsatto Date: Fri, 24 Aug 2018 11:01:02 +0200 Subject: [PATCH 3/3] feat(cache): Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 658f5126..a617a1de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased](https://github.com/contentful/contentful.php/compare/3.3.0...HEAD) +### Added + +* The SDK can now use a locally-cached copy of entries and asset. While this _will not_ prevent API calls when using `getEntries` or `getAssets`, it will intercept calls made with `getEntry` and `getAsset`, including those being made when resolving a link from an entry. You can enable this either using the CLI commands with the `--cache-content` flag, or passing `'cacheContent' => true` to the `$options` array in the client constructor (requires `'autoWarmup'` to also be set to true). + ## [3.3.0](https://github.com/contentful/contentful.php/tree/3.3.0) (2018-06-18) ### Added