Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=fetch&page=1174&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 15666 results for "fetch"(9105ms)

cerebras_codermain.tsx1 match

@kedarkolluri•Updated 6 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

swiftEmeraldAphidmain.tsx1 match

@fame144•Updated 6 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

sqliteExplorerAppmain.tsx4 matches

@danyx23•Updated 6 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

brilliantScarletGorillamain.tsx1 match

@Johner•Updated 6 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

intelligentCyanGibbonmain.tsx1 match

@Johner•Updated 6 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

anon_docmain.tsx6 matches

@kate•Updated 6 months ago
51 const id = path.split("/")[2];
52 if (id && id !== "undefined") {
53 fetchDocument(id);
54 setMode(path.startsWith("/view/") ? "view" : "edit");
55 } else {
59 }, []);
60
61 const fetchDocument = async (id) => {
62 try {
63 const response = await fetch(`/api/document/${id}`);
64 if (!response.ok) {
65 throw new Error(`HTTP error! status: ${response.status}`);
70 setForkId(data.id);
71 } catch (e) {
72 console.error("Error fetching document:", e);
73 setError("Error fetching document. Please try again.");
74 }
75 };
78 e.preventDefault();
79 try {
80 const response = await fetch("/api/document", {
81 method: "POST",
82 headers: { "Content-Type": "application/json" },

telegramSetMessageReactionmain.tsx2 matches

@snowypowers•Updated 6 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface ReactionType {
32 is_big: boolean;
33}) =>
34 fetchJSON(
35 `https://api.telegram.org/bot${botToken}/setMessageReaction`,
36 {

anon_docmain.tsx6 matches

@stevekrouse•Updated 6 months ago
51 const id = path.split("/")[2];
52 if (id && id !== "undefined") {
53 fetchDocument(id);
54 setMode(path.startsWith("/view/") ? "view" : "edit");
55 } else {
59 }, []);
60
61 const fetchDocument = async (id) => {
62 try {
63 const response = await fetch(`/api/document/${id}`);
64 if (!response.ok) {
65 throw new Error(`HTTP error! status: ${response.status}`);
70 setForkId(data.id);
71 } catch (e) {
72 console.error("Error fetching document:", e);
73 setError("Error fetching document. Please try again.");
74 }
75 };
78 e.preventDefault();
79 try {
80 const response = await fetch("/api/document", {
81 method: "POST",
82 headers: { "Content-Type": "application/json" },

EmailSenderhandler1 match

@wolf•Updated 6 months ago
33});
34
35export default app.fetch;

cerebras_codermain.tsx7 matches

@toowired•Updated 6 months ago
15 const { latitude, longitude } = position.coords;
16 setLocation(`${latitude.toFixed(4)}, ${longitude.toFixed(4)}`);
17 fetchWeather(latitude, longitude);
18 }, () => {
19 setLocation("Location not available");
23 }, []);
24
25 const fetchWeather = async (latitude, longitude) => {
26 try {
27 const response = await fetch(`https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&current_weather=true`);
28 const data = await response.json();
29 setWeather(`${data.current_weather.temperature}°C, ${getWeatherDescription(data.current_weather.weathercode)}`);
30 } catch (error) {
31 console.error("Error fetching weather:", error);
32 setWeather("Weather data unavailable");
33 }
70 const loadTackleBox = async () => {
71 try {
72 const response = await fetch("/api/tackleBox");
73 if (response.ok) {
74 const data = await response.json();
167 formData.append("image", lureImage);
168 try {
169 const response = await fetch("/api/uploadImage", {
170 method: "POST",
171 body: formData,
185
186 try {
187 const response = await fetch("/api/tackleBox", {
188 method: "POST",
189 headers: {

manual-fetcher

@miz•Updated 3 days ago

fake-https1 file match

@blazemcworld•Updated 1 week ago
simple proxy to fetch http urls using https