Criando uma promessa com JSON

/*directly writing new Response(data) does NOT work if data is a JSON, for JSON you need a blob*/
	 var data = {key: "value"};
		 var blob = new Blob([JSON.stringify(data, null, 2)]);
		 var myResponse = new Response(blob);
	 	console.log(await myResponse.json());
Javasper