9951 explained code solutions for 126 technologies


chrome-extensionHow to fetch data in content script


fetch('https://example.org/some')
.then(response => response.text())
.then(response => console.log(response))ctrl + c
example.org/some

sample url to fetch data from

esponse.text()

let's assume we're fetching text data

console.log(response)

do something with response