export enum Header { ContentLength = 'content-length', } const head = (url: string): Promise => fetch(url, { method: 'HEAD' }) const get = (url: string): Promise => fetch(url, { method: 'GET' }) const post = (url: string, data: Record): Promise => fetch(url, { method: 'POST', body: JSON.stringify(data), headers: { 'content-type': 'text/plain', }, }) export default { head, get, post }