fetch(url).then(function(response) { response.text().then(function(dataFromServer) { //do stuff }); });