aboutsummaryrefslogtreecommitdiff
path: root/integration/macro/fetchSync.tsx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--integration/macro/fetchSync.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/integration/macro/fetchSync.tsx b/integration/macro/fetchSync.tsx
new file mode 100644
index 000000000..ebe1566e6
--- /dev/null
+++ b/integration/macro/fetchSync.tsx
@@ -0,0 +1,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} />;
+}