1fetch('https://api.github.com/users/manishmshiva', {
2 method: "GET",
3 headers: {"Content-type": "application/json;charset=UTF-8"}
4})
5.then(response => response.json())
6.then(json => console.log(json));
7.catch(err => console.log(err));
1fetch('http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002/?gameid=221380')
2 .then(function(response) {
3 return response.json();
4 })
5 .then(function(myJson) {
6 console.log(JSON.stringify(myJson));
7 });
8
1const GetData = [];
2 useEffect(() => {
3 fetch(API_URL)
4 .then((res) => res.json())
5 .then((data) => {
6 GetModesData.push(...data);
7 setDataState(GetData.map((d) => d.modeName));
8 });
9 }, []);
10
1const GetData = [];
2 useEffect(() => {
3 fetch(API_URL)
4 .then((res) => res.json())
5 .then((data) => {
6 GetModesData.push(...data);
7 setDataState(GetData.map((d) => d.modeName));
8 });
9 }, []);