Skip to content
Snippets Groups Projects
data-pod-client.mjs 274 B
Newer Older
Millicent Billette's avatar
Millicent Billette committed
import fetch from 'node-fetch';

export function DataPodClient(hosts){
	const self = this;
	self.hosts = hosts;
	self.query = queryStr => query(self,queryStr)
	return self;
}
async function query(self,queryStr){
	return await (await fetch(self.hosts[0]+queryStr)).json();
}