aboutsummaryrefslogtreecommitdiff
path: root/integration/macro/fetchSync.tsx
blob: ebe1566e61078c54297728dc3ce98481e02a66eb (plain) (blame)
1
2
3
4
5
6
7
8
export async function fetchSync(ctx) {
  const str = ctx.arguments[0].toString();

  const response = await fetch(str);
  const text = await response.text();

  return <string value={text} />;
}