import { fetch } from "https://esm.town/v/std/fetch";
export function postToMastodon(mastodonApiUrl, mastodonAccessToken, status) {
return fetch(
`${mastodonApiUrl}/statuses?access_token=${mastodonAccessToken}`,
{
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({
status,
}),
}
);
}