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/$%7Burl%7D?q=fetch&page=6&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 9416 results for "fetch"(879ms)

TastkItDashboard.tsx3 matches

@diegoivo•Updated 4 hours ago
21 // Buscar projetos ao carregar o dashboard
22 useEffect(() => {
23 const fetchProjects = async () => {
24 try {
25 const response = await fetch("/api/projects", {
26 method: "GET",
27 credentials: "include",
52 };
53
54 fetchProjects();
55 }, []);
56

TastkItindex.ts1 match

@diegoivo•Updated 4 hours ago
2import app from "./backend/index.ts";
3
4// Exportar a função fetch para o Val Town
5export default app;

AgriAipestDiseases.ts2 matches

@morispolanco•Updated 4 hours ago
19 return c.json(response);
20 } catch (error) {
21 console.error("Error fetching pests/diseases:", error);
22 const response: ApiResponse<null> = {
23 success: false,
55 return c.json(response);
56 } catch (error) {
57 console.error(`Error fetching pest/disease with ID ${c.req.param("id")}:`, error);
58 const response: ApiResponse<null> = {
59 success: false,

AgriAiaiService.ts1 match

@morispolanco•Updated 4 hours ago
44
45 // Make the API request to OpenRouter
46 const response = await fetch("https://openrouter.ai/api/v1/chat/completions", {
47 method: "POST",
48 headers: {

TastkItRegisterForm.tsx1 match

@diegoivo•Updated 4 hours ago
46
47 try {
48 const response = await fetch("/api/auth/register", {
49 method: "POST",
50 headers: {

TastkItLoginForm.tsx1 match

@diegoivo•Updated 4 hours ago
26
27 try {
28 const response = await fetch("/api/auth/login", {
29 method: "POST",
30 headers: {

TastkItApp.tsx2 matches

@diegoivo•Updated 4 hours ago
14 const checkAuth = async () => {
15 try {
16 const response = await fetch("/api/auth/me", {
17 method: "GET",
18 credentials: "include",
50 const handleLogout = async () => {
51 try {
52 await fetch("/api/auth/logout", {
53 method: "POST",
54 credentials: "include",

TownieuseUser.tsx4 matches

@kousun12•Updated 4 hours ago
8 const [error, setError] = useState(null);
9
10 const fetchData = async () => {
11 try {
12 const userEndpoint = new URL(USER_ENDPOINT, window.location.origin);
13
14 const res = await fetch(userEndpoint);
15 const data = await res.json();
16 if (!res.ok) {
33
34 useEffect(() => {
35 fetchData();
36 }, []);
37
38 return { data, loading, error, refetch: fetchData };
39}
40

TownieuseProject.tsx5 matches

@kousun12•Updated 4 hours ago
9 const [error, setError] = useState(null);
10
11 const fetchData = async () => {
12 try {
13 const projectEndpoint = new URL(PROJECT_ENDPOINT, window.location.origin);
17 if (branchId) filesEndpoint.searchParams.append("branchId", branchId);
18
19 const { project } = await fetch(projectEndpoint).then((res) =>
20 res.json()
21 );
22 const { files } = await fetch(filesEndpoint).then((res) => res.json());
23
24 setData({ project, files });
34 useEffect(() => {
35 if (!projectId) return;
36 fetchData();
37 }, [projectId, branchId]);
38
39 return { data, loading, error, refetch: fetchData };
40}
41

TownieuseProjects.tsx4 matches

@kousun12•Updated 4 hours ago
8 const [error, setError] = useState(null);
9
10 const fetchData = async () => {
11 try {
12 const res = await fetch(ENDPOINT);
13 const data = await res.json();
14 if (!res.ok) {
32
33 useEffect(() => {
34 fetchData();
35 }, []);
36
37 return { data, loading, error, refetch: fetchData };
38}
39

proxyFetch2 file matches

@vidar•Updated 2 days ago

TAC_FetchBasic2 file matches

@A7_OMC•Updated 2 days ago