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=394&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 7885 results for "fetch"(1505ms)

cerebras_codermain.tsx1 match

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

googleMapsTravelTimeBetweenAirportsmain.tsx1 match

@nulo•Updated 3 months ago
338 url.searchParams.append("key", apiKey);
339
340 const response = await fetch(url.toString());
341
342 if (!response.ok) {

compassionateFuchsiaXerinaemain.tsx9 matches

@davidho123•Updated 3 months ago
8
9 useEffect(() => {
10 fetchTodos();
11 }, []);
12
13 const fetchTodos = async () => {
14 const response = await fetch("/todos");
15 const data = await response.json();
16 setTodos(data);
21 if (!newTodo.trim()) return;
22
23 const response = await fetch("/todos", {
24 method: "POST",
25 headers: { "Content-Type": "application/json" },
29 if (response.ok) {
30 setNewTodo("");
31 fetchTodos();
32 }
33 };
34
35 const toggleTodo = async (id, completed) => {
36 const response = await fetch(`/todos/${id}`, {
37 method: "PATCH",
38 headers: { "Content-Type": "application/json" },
41
42 if (response.ok) {
43 fetchTodos();
44 }
45 };
46
47 const deleteTodo = async (id) => {
48 const response = await fetch(`/todos/${id}`, {
49 method: "DELETE",
50 });
51
52 if (response.ok) {
53 fetchTodos();
54 }
55 };
51
52 try {
53 const response = await fetch('/', {
54 method: 'POST',
55 headers: { 'Content-Type': 'application/json' },

hnhiringStatsmain.tsx5 matches

@maxm•Updated 3 months ago
1import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
2
3async function fetchJobCount(url: string): Promise<{ count: number; month: string; year: string } | null> {
4 try {
5 const response = await fetch(url);
6 if (!response.ok) {
7 console.error(`Failed to fetch ${url}: ${response.status} ${response.statusText}`);
8 return null;
9 }
20 return { count, month, year };
21 } catch (error) {
22 console.error(`Error fetching ${url}:`, error);
23 return null;
24 }
55
56 for (const url of urls) {
57 const result = await fetchJobCount(url);
58 if (result) {
59 console.log(`${result.count} jobs, ${result.month} ${result.year}`);

arenamain.tsx3 matches

@caizoryan•Updated 4 months ago
282
283 try {
284 // Fetch channel contents from Are.na API
285 const response = await fetch(`https://api.are.na/v2/channels/${slug}`);
286 const data = await response.json();
287
336 });
337 } catch (error) {
338 return new Response(`Error fetching channel: ${error.message}`, { status: 500 });
339 }
340}

exuberantTanAntmain.tsx1 match

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

chivalrousTanLeoponmain.tsx1 match

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

fondIndigoHaddockmain.tsx1 match

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

lovingApricotPossummain.tsx1 match

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

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago