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=361&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 8056 results for "fetch"(796ms)

cerebras_codermain.tsx1 match

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

Clone_CHATGPTbubblyGreenBat6 matches

@Custodia•Updated 2 months ago
10
11 useEffect(() => {
12 fetchChatHistory();
13 }, []);
14
15 const fetchChatHistory = async () => {
16 try {
17 const response = await fetch("/history");
18 const history = await response.json();
19 setMessages(history);
46
47 try {
48 const response = await fetch("/chat", {
49 method: "POST",
50 headers: { "Content-Type": "application/json" },
103 const resetConversation = async () => {
104 try {
105 await fetch("/reset", { method: "POST" });
106 setMessages([]);
107 } catch (error) {
180 `);
181
182 // Fetch chat history
183 if (request.method === "GET" && new URL(request.url).pathname === "/history") {
184 const result = await sqlite.execute(`

Cloneklonmain.tsx6 matches

@Custodia•Updated 2 months ago
12
13 useEffect(() => {
14 fetchChatHistory();
15 }, []);
16
17 const fetchChatHistory = async () => {
18 try {
19 const response = await fetch("/history");
20 const history = await response.json();
21 setMessages(history);
87
88 try {
89 const response = await fetch("/chat", {
90 method: "POST",
91 headers: { "Content-Type": "application/json" },
144 const resetConversation = async () => {
145 try {
146 await fetch("/reset", { method: "POST" });
147 setMessages([]);
148 // Stop any ongoing speech
236 `);
237
238 // Fetch chat history
239 if (request.method === "GET" && new URL(request.url).pathname === "/history") {
240 const result = await sqlite.execute(`

enchantingScarletChickadeemain.tsx6 matches

@Custodia•Updated 2 months ago
12
13 useEffect(() => {
14 fetchChatHistory();
15 }, []);
16
17 const fetchChatHistory = async () => {
18 try {
19 const response = await fetch("/history");
20 const history = await response.json();
21 setMessages(history);
87
88 try {
89 const response = await fetch("/chat", {
90 method: "POST",
91 headers: { "Content-Type": "application/json" },
144 const resetConversation = async () => {
145 try {
146 await fetch("/reset", { method: "POST" });
147 setMessages([]);
148 // Stop any ongoing speech
236 `);
237
238 // Fetch chat history
239 if (request.method === "GET" && new URL(request.url).pathname === "/history") {
240 const result = await sqlite.execute(`

rosylovemain.tsx4 matches

@imankii01•Updated 2 months ago
251
252 try {
253 const response = await fetch("/api/love-template", {
254 method: "POST",
255 headers: { "Content-Type": "application/json" },
709 );
710 } catch (error) {
711 console.error("Error fetching love template:", error);
712 return new Response("Internal Server Error", { status: 500 });
713 }
729 const totalPages = Math.ceil(total / limit);
730
731 // Fetch paginated records
732 const result = await sqlite.execute(`
733 SELECT shareable_id, partner_name, start_date, love_letter, music_url, music_thumbnail, template_type, images, created_at
808 });
809 } catch (error) {
810 console.error("Error fetching love templates:", error);
811 return new Response("<h1>Internal Server Error</h1>", {
812 status: 500,

LlmDashboardmodel-management4 matches

@prashamtrivedi•Updated 2 months ago
170 setTheme("dark");
171 }
172 fetchModels();
173 }, []);
174
181 };
182
183 const fetchModels = async () => {
184 setLoading(true);
185 setProgress(0);
191
192 try {
193 const response = await fetch("/api/models");
194 if (!response.ok) throw new Error("Failed to fetch models");
195 const data = await response.json();
196 setModels(data);

LlmDashboardllm-provider-gemini1 match

@prashamtrivedi•Updated 2 months ago
124 // Note: This is a placeholder as Val Town doesn't have a native Google AI client
125 // Would need to implement actual API call here
126 const response = await fetch(
127 "https://generativelanguage.googleapis.com/v1beta/models/" + model.id + ":generateContent",
128 {

LlmDashboardllm-provider-anthropic1 match

@prashamtrivedi•Updated 2 months ago
112 // Note: This is a placeholder as Val Town doesn't have a native Anthropic client
113 // Would need to implement actual API call here
114 const response = await fetch("https://api.anthropic.com/v1/messages", {
115 method: "POST",
116 headers: {

valentines_day_card_generatorfrontend_card1 match

@shouser•Updated 2 months ago
20 stock_image: "3",
21 });
22 const response = await fetch(`/image?${params.toString()}`, {
23 method: "GET",
24 });

valentines_day_card_generatorimage_uploader1 match

@shouser•Updated 2 months ago
38 formData.append("type", imageType);
39
40 fetch("/upload", {
41 method: "POST",
42 body: formData,

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago