astro/packages/telemetry/src/post.ts
Fred K. Schott ebd7e7ad81
update telemetry to support more anonymized project id (#3713)
* update telemetry to support more anonymized project id

* Create strange-laws-kick.md

* respond to nate feedback
2022-06-27 14:16:07 -07:00

11 lines
326 B
TypeScript

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' },
});
}