let headersList = {
“Accept”: “*/*”,
“User-Agent”: “Thunder Client (https://www.thunderclient.com)”
}
fetch(“https://newsapi.org/v2/everything?q=ipl&from=2022-01-07&sortBy=publishedAt&apiKey=739ea6a82b1f4818a21c8aa2441545c0”, {
method: “GET”,
headers: headersList
}).then(function(response) {
return response.text();
}).then(function(data) {
console.log(data);
})