const fetchJSON = (url) => fetch(url).then(x=>x.json());

const postJSON = (url, body) => {
	const opts = {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json'
		},
		body: JSON.stringify(body)
	}
	return fetch(url, opts).then(x=>x.json());
};