Created
August 22, 2017 17:00
-
-
Save kellyrmilligan/7d871961262a35cfea6779298f224d37 to your computer and use it in GitHub Desktop.
multiple calls from a result - no caching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
id: 1234, | |
title: 'test', | |
view: 'two-column' | |
}, | |
{ | |
id: 1234, | |
title: 'test', | |
view: 'image-only' | |
}] | |
.forEach((article) => { | |
fetch(`/api/articles/${article.id}`, { | |
method: 'GET', | |
headers: { | |
'Content-Type': 'application/json' | |
}, | |
credentials: 'same-origin' | |
}) | |
.then(response => response.json()) | |
.then(articleDetails => article.details = articleDetails) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment