8
9 useEffect(() => {
10 async function fetchStatus() {
11 try {
12 const response = await fetch('https://api.spacetraders.io/v2/');
13 if (!response.ok) throw new Error('Failed to fetch status');
14 const data = await response.json();
15 setStatus(data);
18 }
19 }
20 fetchStatus();
21 }, []);
22
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
69
70 try {
71 const response = await fetch("/transcribe", {
72 method: "POST",
73 body: formData,
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({