src/client.js
function parse_by_content_type(type, body) {
	if(type === 'application/json') {
		return JSON.parse(body);
	}
	if(type === 'text/plain') {
		return ''+body;
	}
	throw new Error("Unknown Content-Type " + type + " -- don't know how to parse!");
}
function parse_by_content_type(type, body) {
	if(type === 'application/json') {
		return JSON.parse(body);
	}
	if(type === 'text/plain') {
		return ''+body;
	}
	throw new Error("Unknown Content-Type " + type + " -- don't know how to parse!");
}
/*