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/$1?q=fetch&page=15&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 11254 results for "fetch"(2550ms)

brainstormingsignup.html2 matches

@diegoivo•Updated 1 day ago
253
254 try {
255 const response = await fetch('/api/auth/signup', {
256 method: 'POST',
257 headers: {
294
295 try {
296 const response = await fetch('/api/auth/login', {
297 method: 'POST',
298 headers: {

aiTodoAppTodoForm.tsx1 match

@dukky•Updated 1 day ago
27 setAiSuggesting(true);
28 try {
29 const response = await fetch("/api/ai/suggest-priority", {
30 method: "POST",
31 headers: { "Content-Type": "application/json" },

brainstormingindex.html1 match

@diegoivo•Updated 1 day ago
276
277 try {
278 const response = await fetch('/api/auth/login', {
279 method: 'POST',
280 headers: {

aiTodoAppApp.tsx10 matches

@dukky•Updated 1 day ago
10 const [aiLoading, setAiLoading] = useState(false);
11
12 // Fetch todos from API
13 const fetchTodos = async () => {
14 try {
15 const response = await fetch("/api/todos");
16 if (response.ok) {
17 const data = await response.json();
19 }
20 } catch (error) {
21 console.error("Error fetching todos:", error);
22 } finally {
23 setLoading(false);
28 const addTodo = async (title: string, description: string, priority: number) => {
29 try {
30 const response = await fetch("/api/todos", {
31 method: "POST",
32 headers: { "Content-Type": "application/json" },
46 const updateTodo = async (id: number, updates: Partial<Todo>) => {
47 try {
48 const response = await fetch(`/api/todos/${id}`, {
49 method: "PUT",
50 headers: { "Content-Type": "application/json" },
64 const deleteTodo = async (id: number) => {
65 try {
66 const response = await fetch(`/api/todos/${id}`, {
67 method: "DELETE",
68 });
80 setAiLoading(true);
81 try {
82 const response = await fetch("/api/ai/prioritize", {
83 method: "POST",
84 headers: { "Content-Type": "application/json" },
87 if (response.ok) {
88 // Refresh todos to get updated AI priorities
89 await fetchTodos();
90 }
91 } catch (error) {
97
98 useEffect(() => {
99 fetchTodos();
100 }, []);
101

aiTodoApptodos.ts4 matches

@dukky•Updated 1 day ago
17 return c.json(todoList);
18 } catch (error) {
19 console.error("Error fetching todos:", error);
20 return c.json({ error: "Failed to fetch todos" }, 500);
21 }
22});
37 return c.json(todo);
38 } catch (error) {
39 console.error("Error fetching todo:", error);
40 return c.json({ error: "Failed to fetch todo" }, 500);
41 }
42});

porfolioindex.ts1 match

@Jxsco114•Updated 1 day ago
178
179// This is the entry point for HTTP vals
180export default app.fetch;

porfolioscript.js1 match

@Jxsco114•Updated 1 day ago
226 const data = Object.fromEntries(formData);
227
228 const response = await fetch('/api/contact', {
229 method: 'POST',
230 headers: {

brainstormingapp.html4 matches

@diegoivo•Updated 1 day ago
250 async function loadSessions() {
251 try {
252 const response = await fetch('/api/sessions');
253 if (response.ok) {
254 sessions = await response.json();
298 async function loadSession(sessionId) {
299 try {
300 const response = await fetch(`/api/sessions/${sessionId}`);
301 if (response.ok) {
302 const data = await response.json();
344 if (!currentSession) {
345 try {
346 const response = await fetch('/api/sessions', {
347 method: 'POST',
348 headers: { 'Content-Type': 'application/json' },
371 try {
372 // Send message to API
373 const response = await fetch(`/api/sessions/${currentSession.id}/messages`, {
374 method: 'POST',
375 headers: { 'Content-Type': 'application/json' },

project1index.ts1 match

@greeshma•Updated 1 day ago
27});
28
29export default app.fetch;

project1todos.ts2 matches

@greeshma•Updated 1 day ago
11 return c.json(todoList);
12 } catch (error) {
13 console.error("Error fetching todos:", error);
14 return c.json({ error: "Failed to fetch todos" }, 500);
15 }
16});

fetch-socials4 file matches

@welson•Updated 20 hours ago
fetch and archive my social posts

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 1 day ago