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$%7BviewSourceLink%7D/%22?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 18999 results for "fetch"(783ms)

webgpu_1main.tsx1 match

@saolsenUpdated 1 day ago
4
5async function main() {
6 const shader = await (await fetch(`${module_path}/shader.wgsl`)).text();
7
8 const adapter = await navigator.gpu?.requestAdapter();

betterstackmain.tsx4 matches

@vovUpdated 1 day ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3const HF_TOKEN =
16 );
17
18 const jwtResponse = await fetch(
19 `https://huggingface.co/api/spaces/altox/asd/jwt?expiration=${expirationDate}&include_pro_status=true`,
20 {
30 console.log({ token });
31
32 // await fetch(
33 // "https://uptime.betterstack.com/api/v2/monitors/3276488",
34 // {
46 // );
47
48 const response = await fetch(
49 "https://uptime.betterstack.com/api/v2/monitors/3276488",
50 {

wa-honomain.tsx1 match

@nbbaierUpdated 1 day ago
64app.get("/**/*", (c) => serveFile(c.req.path));
65
66export default app.fetch;

cerebras_coderindex.ts1 match

@rrosttUpdated 1 day ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({
13 });
14
15 // Fetch weather data for Madrid using Open-Meteo API
16 const weatherResponse = await fetch(
17 'https://api.open-meteo.com/v1/forecast?latitude=40.4168&longitude=-3.7038&current=temperature_2m,weather_code,wind_speed_10m&timezone=Europe%2FMadrid'
18 );
19
20 if (!weatherResponse.ok) {
21 throw new Error('Failed to fetch weather data');
22 }
23
191<body style="font-family: sans-serif; text-align: center; padding: 50px; background: #f0f0f0;">
192 <h1>🌍 Weather Temporarily Unavailable</h1>
193 <p>Unable to fetch current weather data for Madrid. Please try again later.</p>
194 <p><em>Error: ${error instanceof Error ? error.message : 'Unknown error'}</em></p>
195</body>
22 // Use custom hooks for all stateful logic
23 const { userEmail, isAuthorized } = useAuth();
24 const { data, loading, error, refetch } = useGlimpseData(
25 glimpseId,
26 initialData,
107 <div className="flex gap-3">
108 <button
109 onClick={refetch}
110 className="bg-red-600 text-white px-4 py-2 rounded hover:bg-red-700 transition-colors"
111 >

krazyy-cam-configmain.ts3 matches

@krazyykrunalUpdated 1 day ago
71
72 // ---- Exchange JWT for access token ----
73 const tokenRes = await fetch("https://oauth2.googleapis.com/token", {
74 method: "POST",
75 headers: { "Content-Type": "application/x-www-form-urlencoded" },
89
90 // ---- Query Firestore publicLenses ----
91 const pubDocRes = await fetch(
92 `https://firestore.googleapis.com/v1/projects/${projectId}/databases/(default)/documents/publicLenses/${id}`,
93 { headers: { Authorization: `Bearer ${access_token}` } },
105
106 // ---- Query Firestore private user doc ----
107 const privDocRes = await fetch(
108 `https://firestore.googleapis.com/v1/projects/${projectId}/databases/(default)/documents/users/${owner}/lenses/${id}`,
109 { headers: { Authorization: `Bearer ${access_token}` } },

outhpackage-lock.json3 matches

@oguzhanculhaUpdated 1 day ago
441 "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
442 },
443 "node-fetch": {
444 "version": "2.6.1",
445 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
446 "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
447 },
623 "requires": {
624 "lodash": "4.17.13",
625 "node-fetch": "^2.6.0",
626 "request": "2.88.0"
627 }

outhpackage-lock.json11 matches

@oguzhanculhaUpdated 1 day ago
21 "knockout": "^3.5.1",
22 "morgan": "~1.10.0",
23 "node-fetch": "^3.2.10",
24 "rand-token": "^1.0.1",
25 "randomstring": "^1.2.1",
489 }
490 },
491 "node_modules/fetch-blob": {
492 "version": "3.2.0",
493 "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
494 "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
495 "funding": [
568 "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
569 "dependencies": {
570 "fetch-blob": "^3.1.2"
571 },
572 "engines": {
924 }
925 },
926 "node_modules/node-fetch": {
927 "version": "3.3.2",
928 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
929 "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
930 "dependencies": {
931 "data-uri-to-buffer": "^4.0.0",
932 "fetch-blob": "^3.1.4",
933 "formdata-polyfill": "^4.0.10"
934 },
938 "funding": {
939 "type": "opencollective",
940 "url": "https://opencollective.com/node-fetch"
941 }
942 },
1158 "dependencies": {
1159 "camelcase": "6.2.0",
1160 "node-fetch": "^2.6.7"
1161 }
1162 },
1163 "node_modules/st-schema/node_modules/node-fetch": {
1164 "version": "2.6.12",
1165 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",
1166 "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",
1167 "dependencies": {

untitled-1168package-lock.json11 matches

@oguzhanculhaUpdated 1 day ago
21 "knockout": "^3.5.1",
22 "morgan": "~1.10.0",
23 "node-fetch": "^3.2.10",
24 "rand-token": "^1.0.1",
25 "randomstring": "^1.2.1",
489 }
490 },
491 "node_modules/fetch-blob": {
492 "version": "3.2.0",
493 "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
494 "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
495 "funding": [
568 "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
569 "dependencies": {
570 "fetch-blob": "^3.1.2"
571 },
572 "engines": {
924 }
925 },
926 "node_modules/node-fetch": {
927 "version": "3.3.2",
928 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
929 "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
930 "dependencies": {
931 "data-uri-to-buffer": "^4.0.0",
932 "fetch-blob": "^3.1.4",
933 "formdata-polyfill": "^4.0.10"
934 },
938 "funding": {
939 "type": "opencollective",
940 "url": "https://opencollective.com/node-fetch"
941 }
942 },
1158 "dependencies": {
1159 "camelcase": "6.2.0",
1160 "node-fetch": "^2.6.7"
1161 }
1162 },
1163 "node_modules/st-schema/node_modules/node-fetch": {
1164 "version": "2.6.12",
1165 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",
1166 "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",
1167 "dependencies": {

FetchBasic2 file matches

@bengoldUpdated 2 weeks ago

fetch1 file match

@raifyUpdated 2 weeks ago