jsoninvoicemain.tsx1 match
74});
7576export default app.fetch;
77
bluesky_bot_templatemain.tsx6 matches
17}
1819// Helper function to fetch SVG and convert to base64
20async function fetchSVGAsBase64(url: string): Promise<string> {
21const response = await fetch(url);
22if (!response.ok) {
23throw new Error(`Failed to fetch SVG: ${response.status} ${response.statusText}`);
24}
25const svgText = await response.text();
4849try {
50// Fetch SVG from the specified URL
51const svgDataUri = await fetchSVGAsBase64("https://alexwein-fabwbogglelike.web.val.run/?svg=1");
5253// Upload blob to Bluesky
vividCopperWrenmain.tsx1 match
187188try {
189const response = await fetch("/", {
190method: "POST",
191body: JSON.stringify({
reverentAquaCuckoomain.tsx1 match
187188try {
189const response = await fetch("/", {
190method: "POST",
191body: JSON.stringify({
187188try {
189const response = await fetch("/", {
190method: "POST",
191body: JSON.stringify({
cerebras_codermain.tsx1 match
187188try {
189const response = await fetch("/", {
190method: "POST",
191body: JSON.stringify({
9const rssUrl = `https://www.youtube.com/feeds/videos.xml?channel_id=${channelId}`;
1011const response = await fetch(rssUrl);
12if (!response.ok) {
13throw new Error("Failed to fetch RSS feed for channel");
14}
15
rm_ios_testmain.tsx11 matches
417};
418419// [ADDED] Fetch the correct 434x0w.webp icon & store link via iTunes Search
420const handleFetchIcon = async () => {
421if (!editedApp.name) {
422alert("Please enter a name first.");
424}
425try {
426const res = await fetch(
427`https://itunes.apple.com/search?term=${encodeURIComponent(editedApp.name)}&entity=software`,
428);
444} catch (error) {
445console.error(error);
446alert("Error fetching from iTunes. See console for details.");
447}
448};
491<button onClick={onClose}>Cancel</button>
492<button onClick={handleSearch}>Search App Store</button>
493{/* [ADDED] The new button to fetch the correct icon + link */}
494<button onClick={handleFetchIcon}>Fetch Icon</button>
495496{app?.id && (
575// Get all apps, build categories
576const loadApps = async () => {
577const response = await fetch("/api/apps");
578const data = await response.json();
579setApps(data.apps);
603const handleSave = async (updatedApp: App) => {
604const method = updatedApp.id ? "PUT" : "POST";
605await fetch("/api/apps", {
606method,
607headers: { "Content-Type": "application/json" },
614const handleDelete = async (id: string) => {
615if (!window.confirm("Are you sure you want to delete this app?")) return;
616const resp = await fetch(`/api/apps/${id}`, { method: "DELETE" });
617if (resp.ok) {
618await loadApps();
631// Export
632const handleExportApps = async () => {
633const response = await fetch("/api/apps");
634const data = await response.json();
635const jsonStr = JSON.stringify(data.apps, null, 2);
652const text = await file.text();
653const importedApps = JSON.parse(text);
654await fetch("/api/apps/import", {
655method: "POST",
656headers: { "Content-Type": "application/json" },
emailValHandlerNomain.tsx8 matches
140lastRequestTime = Date.now();
141142const fetchOptions: RequestInit = {
143method: "POST",
144body: JSON.stringify({ url }),
147// Only add headers if API key is available
148if (apiKey) {
149fetchOptions.headers = {
150"Authorization": `Bearer ${apiKey}`,
151"Content-Type": "application/json",
153}
154155const response = await fetch("https://md.dhr.wtf/", fetchOptions);
156
157if (!response.ok) {
162markdownResults.push({ url, markdown });
163} catch (error) {
164console.error(`Error fetching markdown for ${url}:`, error);
165markdownResults.push({ url, markdown: `Error fetching content: ${error.message}` });
166}
167}
172async function analyzeImage(imageAttachment, apiKey, transformedPrompt) {
173try {
174const response = await fetch("https://api.openai.com/v1/chat/completions", {
175method: "POST",
176headers: {
283};
284285const response = await fetch(openaiUrl, {
286method: "POST",
287body: JSON.stringify(body),
413414// Send the request to OpenAI
415const response = await fetch(openaiUrl, {
416method: "POST",
417body: JSON.stringify(body),
kanbanTodoListmain.tsx9 matches
4041useEffect(() => {
42fetchTasks();
43loadUserPreferences();
44}, []);
72}
7374async function fetchTasks() {
75try {
76const response = await fetch("/get-tasks");
77const data = await response.json();
78setTaskLists(data);
79} catch (error) {
80console.error("Error fetching tasks", error);
81}
82}
8687try {
88const response = await fetch("/add-task", {
89method: "POST",
90headers: { "Content-Type": "application/json" },
107108try {
109const response = await fetch("/move-task", {
110method: "POST",
111headers: { "Content-Type": "application/json" },
125async function removeTask(taskId, column) {
126try {
127const response = await fetch("/delete-task", {
128method: "POST",
129headers: { "Content-Type": "application/json" },
142143try {
144const response = await fetch("/move-task", {
145method: "POST",
146headers: { "Content-Type": "application/json" },
174if (!editedTaskText.trim() || !taskBeingEdited) return;
175try {
176const response = await fetch("/update-task", {
177method: "POST",
178headers: { "Content-Type": "application/json" },