summaryrefslogtreecommitdiff
path: root/packages/telemetry/src/post.ts
blob: a0647075f9889b7437f64d29400b41cf4cefe9c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import fetch from 'node-fetch';

const ASTRO_TELEMETRY_ENDPOINT = `https://telemetry.astro.build/api/v1/record`;

export function post(body: Record<string, any>): Promise<any> {
	return fetch(ASTRO_TELEMETRY_ENDPOINT, {
		method: 'POST',
		body: JSON.stringify(body),
		headers: { 'content-type': 'application/json' },
	});
}