Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive-news-reader #8

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

JuliusVai
Copy link

No description provided.


var url = `https://newsapi.org/v2/top-headlines?country=Gb&apiKey=fef23a6326874b0a8642a68a9dc15687`;
var req = new Request(url);
fetch(url)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can pass in the url directly to fetch without creating a Request

});

function displayNews(data) {
const html = data.articles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants