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//%22$%7Bconfig.siteUrl%7D/%22?q=fetch&page=4&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 18997 results for "fetch"(716ms)

mcp-registry

mcp-registrymain.tsx8 matches

@cameronpak•Updated 16 hours ago
540 if (version) queryParams.version = version;
541
542 // Fetch servers from the MCP Registry
543 const response = await client.listServers(queryParams);
544
592 );
593 } catch (error) {
594 console.error("Error fetching servers:", error);
595 return c.html(<ErrorPage error={error.message} />, 500);
596 }
627 }
628
629 const response = await fetch(officialUrl.toString(), {
630 headers: {
631 "Accept": "application/json, application/problem+json",
659 }
660
661 const response = await fetch(officialUrl.toString(), {
662 headers: {
663 "Accept": "application/json, application/problem+json",
682app.get("/v0/health", async (c) => {
683 try {
684 const response = await fetch(`${OFFICIAL_REGISTRY}/v0/health`, {
685 headers: {
686 "Accept": "application/json, application/problem+json",
705app.get("/v0/ping", async (c) => {
706 try {
707 const response = await fetch(`${OFFICIAL_REGISTRY}/v0/ping`, {
708 headers: {
709 "Accept": "application/json, application/problem+json",
730 const body = await c.req.json();
731
732 const response = await fetch(`${OFFICIAL_REGISTRY}/v0/publish`, {
733 method: "POST",
734 headers: {
766});
767
768export default app.fetch;

euro-aipmain.ts1 match

@orionll•Updated 16 hours ago
20 }
21
22 const res = await fetch(url);
23 const html = await res.text();
24 const result = await parseAIP(html, url);

Letterboxd_Blueskymain.ts3 matches

@Petezarustica•Updated 16 hours ago
27 }
28
29 // 2) Fetch & parse the RSS feed
30 const parser = new Parser();
31 const res = await fetch(RSS_URL, { redirect: "follow" });
32 if (!res.ok) {
33 throw new Error(`RSS fetch failed: ${res.status} ${res.statusText}`);
34 }
35 const xml = await res.text();

euro-aipairports.ts2 matches

@orionll•Updated 16 hours ago
22
23async function getAirportsAvinor(cycleStart: string): string {
24 const response = await fetch("https://aim-prod.avinor.no/no/AIP/");
25 const path = new URL(
26 `${cycleStart}-AIRAC/html/eAIP/EN-AD-0.6-en-GB.html`,
43
44async function getAirports(aip) {
45 const respose = await fetch(aip);
46 const html = await respose.text();
47 const doc = (new JSDOM(html)).window.document;

NowPlayingGrabbermain.tsx2 matches

@yaoge•Updated 18 hours ago
12 const basic = Buffer.from(`${client_id}:${client_secret}`).toString("base64");
13
14 const response = await fetch(TOKEN_ENDPOINT, {
15 method: "POST",
16 headers: {
31 const { access_token } = await getAccessToken(client_id, client_secret, refresh_token);
32
33 const response = await fetch(NOW_PLAYING_ENDPOINT, {
34 headers: {
35 Authorization: `Bearer ${access_token}`,

cronemain.ts1 match

@jrmann100•Updated 20 hours ago
31app.post("/api/interactions", verify, handleInteraction);
32
33export default app.fetch;
34

GLM-4-5-Omnimain.tsx4 matches

@aibotcommander•Updated 20 hours ago
160 static async processFile(url: string, name: string): Promise<ProcessedFile> {
161 try {
162 const response = await fetch(url);
163 if (!response.ok) {
164 throw new Error(`Failed to fetch file: ${response.status}`);
165 }
166
391 if (SUPPORTED_IMAGE_EXTENSIONS.has(`.${extension}`)) {
392 try {
393 const response = await fetch(attachment.url);
394 const buffer = await response.arrayBuffer();
395 const base64 = btoa(String.fromCharCode(...new Uint8Array(buffer)));
438 }
439
440 return fetch(config.endpoint, {
441 method: "POST",
442 headers: config.headers,

untitled-7197main.ts1 match

@sammy•Updated 20 hours ago
49 }&count=3`;
50
51 const bingResponse = await fetch(bingUrl, {
52 headers: { "Ocp-Apim-Subscription-Key": BING_API_KEY },
53 });

openai-usagemain.ts6 matches

@nbbaier•Updated 22 hours ago
1import { betterFetch } from "npm:@better-fetch/fetch";
2import { Temporal } from "npm:temporal-polyfill";
3type CostsObject = {
26
27/**
28 * Fetch organization costs for a given time period
29 */
30export async function fetchOrganizationCosts(
31 startTime: number,
32 days: number,
40 : `https://api.openai.com/v1/organization/costs?start_time=${startTime}&limit=${days}`;
41
42 const { data, error } = await betterFetch<Page<CostsObject>>(url, {
43 headers: { Authorization: `Bearer ${Bun.env.OPENAI_ADMIN_KEY}` },
44 });
45
46 if (error) {
47 console.error("Error fetching organization costs:", error);
48 if (error.status === 401 || error.status === 403) {
49 throw new Error(
51 );
52 }
53 throw new Error(`Failed to fetch organization costs: ${error.message}`);
54 }
55

inlinemain.ts3 matches

@realtime•Updated 22 hours ago
232 async function runAgent(agentName, state, agentType) {
233 const card = createAgentCard(agentName, agentType);
234 const response = await fetch(\`/api/run-agent/\${agentName}\`, {
235 method: 'POST',
236 headers: { 'Content-Type': 'application/json' },
272 for (const agentName of primaryWorkflow) {
273 await runAgent(agentName, currentState, 'analysis');
274 // Fetch the full report from the card to update state correctly
275 currentState[\`\${agentName}_report\`] = JSON.parse(document.getElementById(\`report-card-\${agentName}\`).dataset.report);
276 }
361});
362
363export default app.fetch;

FetchBasic2 file matches

@bengold•Updated 2 weeks ago

fetch1 file match

@raify•Updated 2 weeks ago