1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { fetch } from "https://esm.town/v/std/fetch";
export const fetchText = async (url: string): Promise<string | null> => {
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
return await response.text();
}
catch (error) {
console.error("Failed to fetch feeds:", error);
return null;
}
};