What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-12 22:29:03
javascript how to fetch data
fetch('http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0002/?gameid=221380') .then(function(response) { return response.json(); }) &nb... Add solution -
Other 2021-10-08 05:19:02
Search wikipedia
// JavaScript Document let resultsList = document.getElementById('resultsList'); let searchForm = document.getElementById('searchForm'); let searchInput = document.getElementById('searchInput'); searchForm.addEventListener('submit', (e)=> { e.preven... Add solution -
Javascript 2021-10-06 21:16:04
react fetch data in for loop
/* ORIGINAL CODE */ videoUrls=()=>{ let i=0; let urllist=[] for(i;i< this.state.data.length;i++){ fetch(`https://www.googleapis.com/youtube/v3/search?part=snippet&q=${this.state.data[i].name}&key=xxxxxxxxxxx0`) .then(respo... Add solution -
Javascript 2021-10-06 14:19:05
fetch post json
//Obj of data to send in future like a dummyDb const data = { username: 'example' }; //POST request with body equal on data in JSON format fetch('https://example.com/profile', { method: 'POST', headers: { 'Content-Type': 'application/json', }, ... Add solution -
Javascript 2021-10-03 21:26:03
post fetch call
async function postData(url = '', data = {}) { // Default options are marked with * const response = await fetch(url, { method: 'POST', // *GET, POST, PUT, DELETE, etc. mode: 'cors', // no-cors, *cors, same-origin cache: 'no-cache', // *de... Add solution
Best helpers
Ranking is empty