catch status code 403 in fetch

Solutions on MaxInterview for catch status code 403 in fetch by the best coders in the world

showing results for - "catch status code 403 in fetch"
Damien
23 Jul 2020
1let response = await fetch(url1);
2		console.log(response.status);
3		if (response.status == 200) {
4			let resJSON = await response.json();
5			console.log(resJSON);
6            let data=resJSON;
7		} else {
8			console.log("ERROR");
9		}