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/$%7Bart_info.art.src%7D?q=fetch&page=1033&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 13403 results for "fetch"(1502ms)

crossmintSolanaTxGeneratormain.tsx1 match

@alfongj•Updated 7 months ago
29 setLoading(true);
30 try {
31 const res = await fetch("/generate", {
32 method: "POST",
33 headers: { "Content-Type": "application/json" },

sendxmppapiREADME.md1 match

@singpolyma•Updated 7 months ago
4
5```js
6await fetch("https://singpolyma-sendxmppapi.web.val.run", {
7 method: "POST",
8 body: JSON.stringify({ target: "someone@example.com", body: "Hello!" })

worthyCyanRoundwormmain.tsx2 matches

@vawogbemi•Updated 7 months ago
246 e.preventDefault();
247 const finalAmount = showCustomAmount ? parseFloat(customAmount) : amount;
248 const response = await fetch("/create-checkout-session", {
249 method: "POST",
250 headers: { "Content-Type": "application/json" },
504 }
505
506 // Fetch all tips for the root endpoint
507 const allTips = await sqlite.execute(
508 `SELECT name, amount, comment, timestamp FROM ${KEY}_payments_${SCHEMA_VERSION} ORDER BY amount DESC`,

forbearingAmethystToadmain.tsx2 matches

@vawogbemi•Updated 7 months ago
246 e.preventDefault();
247 const finalAmount = showCustomAmount ? parseFloat(customAmount) : amount;
248 const response = await fetch("/create-checkout-session", {
249 method: "POST",
250 headers: { "Content-Type": "application/json" },
504 }
505
506 // Fetch all tips for the root endpoint
507 const allTips = await sqlite.execute(
508 `SELECT name, amount, comment, timestamp FROM ${KEY}_payments_${SCHEMA_VERSION} ORDER BY amount DESC`,

fluentAmberHyenamain.tsx7 matches

@deepmojo•Updated 7 months ago
9 const [error, setError] = useState("");
10
11 const fetchCrawlResults = async () => {
12 setLoading(true);
13 setError("");
14 try {
15 const res = await fetch(`${window.location.href}api/map`, {
16 method: "POST",
17 headers: {
27 }
28 } catch (error) {
29 console.error("Error fetching crawl results:", error);
30 setError(`Error: ${error.message}`);
31 } finally {
52 />
53 <button
54 onClick={fetchCrawlResults}
55 disabled={loading || !domain}
56 style={{
110
111 try {
112 const response = await fetch("https://api.firecrawl.dev/v1/map", {
113 method: "POST",
114 headers: {
121 const data = await response.json();
122 if (!response.ok) {
123 return Response.json({ error: data.message || "Failed to fetch data" }, { status: response.status });
124 }
125
126 return Response.json(data);
127 } catch (error) {
128 console.error("Error fetching data:", error);
129 return Response.json({ error: "Internal server error" }, { status: 500 });
130 }

efficientWhiteBobolinkmain.tsx6 matches

@deepmojo•Updated 7 months ago
9 const [error, setError] = useState("");
10
11 const fetchCrawlResults = async () => {
12 setLoading(true);
13 setError("");
14 try {
15 const res = await fetch(`${window.location.origin}/api`, {
16 method: 'POST',
17 headers: {
27 }
28 } catch (error) {
29 console.error("Error fetching crawl results:", error);
30 setError(`Error: ${error.message}`);
31 } finally {
59 />
60 <button
61 onClick={fetchCrawlResults}
62 disabled={loading || !domain}
63 style={{
130 }
131
132 const firecrawlResponse = await fetch("https://api.firecrawl.dev/v1/map", {
133 method: "POST",
134 headers: {
149 return Response.json({ urls: firecrawlData.urls });
150 } else {
151 return Response.json({ error: firecrawlData.message || "Failed to fetch crawl data" }, { status: firecrawlResponse.status });
152 }
153 } catch (error) {

evaltownWorkermain.tsx5 matches

@deepmojo•Updated 7 months ago
22 const [unit, setUnit] = useState("celsius");
23
24 const fetchWeather = async () => {
25 setLoading(true);
26 setError("");
27 try {
28 const res = await fetch(`${window.location.href}api?city=${encodeURIComponent(city)}`);
29 const data = await res.json();
30 if (data.error) {
65 />
66 <button
67 onClick={fetchWeather}
68 disabled={loading || !city}
69 style={{
168 const weatherUrl =
169 `https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&current_weather=true&daily=temperature_2m_max,weathercode&timezone=auto&forecast_days=5`;
170 const weatherRes = await fetch(weatherUrl);
171 const weatherData = await weatherRes.json();
172
189 });
190 } catch (error) {
191 return Response.json({ error: "Failed to fetch weather data" }, { status: 500 });
192 }
193 } else if (req.method === "GET") {

rabbitstreammain.tsx2 matches

@temptemp•Updated 7 months ago
29 getSourcesParams.append("b", browserid);
30 console.log(getSourcesParams);
31 const result = await fetch(
32 `https://rabbitstream.net/ajax/v2/embed-4/getSources?${getSourcesParams.toString()}`,
33 {
49});
50
51export default app.fetch;

otherBrokenURLhandlermain.tsx11 matches

@willthereader•Updated 7 months ago
44}
45
46// Link Fetching Helper
47export class LinkFetcher {
48 static discoveredUrls = new Set();
49 static pageDepths = new Map();
50 static processQueue = [];
51 static async fetchLinksFromWebsite(websiteUrl) {
52 console.log(`\nFetching links from website: ${websiteUrl}`);
53 const discoveredPages = new Set([websiteUrl]);
54 const pagesToProcess = [websiteUrl];
72
73 console.log(`Making LSD API request for ${pageUrl}...`);
74 const response = await fetch(
75 `https://lsd.so/api?query=${encodeURIComponent(query)}`
76 );
77
78 if (!response.ok) {
79 console.log(`Failed to fetch links from ${pageUrl}`);
80 return [];
81 }
110 }
111
112 console.log(`Successfully fetched ${allLinks.length} links from ${discoveredPages.size} pages`);
113 return allLinks;
114 }
154 try {
155 console.log(`Attempting HEAD request for: ${url}`);
156 const response = await fetch(url, { method: 'HEAD' });
157
158 if (!response.ok) {
159 console.log(`HEAD request failed, attempting GET request for: ${url}`);
160 const getResponse = await fetch(url, { method: 'GET' });
161 return { ok: getResponse.ok, status: getResponse.status };
162 }
307 };
308
309 // Fetch all links with progress tracking
310 const links = await LinkFetcher.fetchLinksFromWebsite(websiteUrl);
311 const totalPages = new Set(links.map(link => new URL(link.link, websiteUrl).origin + new URL(link.link, websiteUrl).pathname)).size;
312

cerebras_codermain.tsx1 match

@chadparker•Updated 7 months ago
23
24 try {
25 const response = await fetch("/", {
26 method: "POST",
27 body: JSON.stringify({ prompt, currentCode: code }),

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 2 days ago