Cómo enviar una solicitud a un servidor web JavaScript

fetch(url).then(response => {
	  return response.json(); //you can use other things like .text() to get different parts of the returned packet
	}).then(json => {
		finalOutput = json;
	})
AvidCoder