Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js fetch

fetch('http://example.com')
	.then(response => response.text())
	.then(data => console.log(data))
	.catch(err => console.error(err));
/* for JSON, use response.json() on the 2nd line */
 
PREVIOUS NEXT
Tagged: #js #fetch
ADD COMMENT
Topic
Name
9+6 =