TextTransformermain.tsx2 matches
37
38try {
39const response = await fetch('${url}', {
40method: 'POST',
41headers: {
52textarea.value = data;
53} catch (error) {
54console.error('Error during fetch:', error);
55alert('There was an error processing your request.');
56}
HtmlFormattermain.tsx2 matches
39
40try {
41const response = await fetch('${url}', {
42method: 'POST',
43headers: {
54textarea.value = data;
55} catch (error) {
56console.error('Error during fetch:', error);
57alert('There was an error processing your request.');
58}
multirouteHonomain.tsx1 match
122app.notFound((c) => c.render(<NotFoundPage />));
123124export default app.fetch;
blobbyFacemain.tsx15 matches
2import { blobby } from "https://esm.town/v/yawnxyz/blobby";
3import { fileTypeFromBuffer } from 'npm:file-type';
4import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
5import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=74";
6666768// Endpoint to fetch blob by key
69app.get("/blob/:key", async (c) => {
70const key = c.req.param('key');
193this.blobs[key] = {isLoading: true};
194
195const response = await fetch('/blob/' + key);
196const contentType = response.headers.get('Content-Type');
197blob.type = contentType || 'text/plain';
223let blob = this.blobs[key];
224try {
225const response = await fetch('/create/' + key, {
226method: 'POST',
227headers: {
247248// Send a delete request to the server
249const response = await fetch('/delete/' + key, { method: 'GET' });
250251// Check the response status
313
314try {
315const response = await fetch('/upload/' + key, {
316method: 'POST',
317body: formData,
338
339try {
340const response = await fetch('/uploadUrl' + '?key=' + key + '&url=' + url);
341
342if (!response.ok) {
361if (!this.newKeyName) return;
362try {
363const response = await fetch('/rename?key='+key+'&newKey='+this.newKeyName);
364if (!response.ok) {
365throw new Error('Failed to rename blob');
526async loadBlob() {
527this.isLoading = true;
528const response = await fetch('/blob/' + this.key);
529const contentType = response.headers.get('Content-Type');
530this.blobType = contentType || 'text/plain';
550async updateCreate() {
551try {
552const response = await fetch('/create/' + this.key, {
553method: 'POST',
554headers: {
573574try {
575const response = await fetch('/upload/' + this.key, {
576method: 'POST',
577body: formData,
593if (this.uploadUrl) {
594try {
595const response = await fetch('/uploadUrl?key=' + this.key + '&url=' + this.uploadUrl);
596597if (!response.ok) {
610if (!this.newKeyName) return;
611try {
612const response = await fetch('/rename?key=' + this.key + '&newKey=' + this.newKeyName);
613if (!response.ok) {
614throw new Error('Failed to rename blob');
707708709// export default app.fetch;
710export default passwordAuth(app.fetch, {
711// password: "123", // Deno.env.get("AUTH_TEST"),
712});
isMyWebsiteDownmain.tsx2 matches
10let reason: string;
11try {
12const res = await fetch(URL, { redirect: "follow" });
13if (res.status !== 200) {
14reason = `(status code: ${res.status})`;
16}
17} catch (e) {
18reason = `couldn't fetch: ${e}`;
19ok = false;
20}
isMyWebsiteDownmain.tsx2 matches
8let reason: string;
9try {
10const res = await fetch(URL, { redirect: "follow" });
11if (res.status !== 200) {
12reason = `(status code: ${res.status})`;
14}
15} catch (e) {
16reason = `couldn't fetch: ${e}`;
17ok = false;
18}
violetBuzzardmain.tsx2 matches
122};
123124export type FetchAction = {
125type: "run";
126command: string;
139};
140141export type Command = OpenAction | CopyAction | FetchAction | PushAction;
142export type View = List | Detail | Form;
143
counterTownmain.tsx2 matches
1/** @jsxImportSource npm:hono@3/jsx */
2import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
3import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
4import { Hono } from "npm:hono";
55051const app = new Hono();
52export default reloadOnSaveFetchMiddleware(counterTownMiddleware(app.fetch));
53app.get("/", async (c) => {
54return c.html(
placemarkGlobeMonitormain.tsx5 matches
1import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
23async function fetchPluginData(pluginId) {
4const response = await fetch(`https://www.figma.com/api/plugins/${pluginId}/versions`);
5if (!response.ok) {
6throw new Error(`Failed to fetch data for plugin ${pluginId}: ${response.statusText}`);
7}
8const data = await response.json();
12export default async function(interval: Interval) {
13try {
14const microPlugin = await fetchPluginData("1349001943025285729");
15const wireBoxPlugin = await fetchPluginData("764471577604277919");
1617await sqlite.execute(`
38});
3940export default app.fetch;