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/image-url.jpg%20%22Optional%20title%22?q=fetch&page=2&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 8251 results for "fetch"(596ms)

Runtime146 words

https://docs.val.town/reference/runtime/
requests. Vals have access to environment variables. The experimental Temporal API is enabled. Included environment. fetch to make HTTP requests. import from npm and https. Custom Types View the custom

Sections

Included environment

Included environment. fetch to make HTTP requests. import from npm and https. Custom Types View the custom types we support

Val Town Docs181 words

https://docs.val.town/
Storage Store and retrieve any data OpenAI Use the OpenAI API Email Send emails Proxied Fetch Make requests from anonymous IP addresses API and SDK. You can access Val Town

Sections

Val Town Standard Library

Storage Store and retrieve any data OpenAI Use the OpenAI API Email Send emails Proxied Fetch Make requests from anonymous IP addresses

Permissions899 words

https://docs.val.town/reference/permissions/
url: "http://localhost:3001/v1/fetch?url=https%3A%2F%2Fuser-secretEndpoint.web.val.run". } By supplying the environment variable in a header, I’m allowed access: With authenticationRun in Val Town ↗ import { fetch } from "https://esm.town/v/std/fetch"; const response = await

Sections

Exposing your vals to the internet

url: "http://localhost:3001/v1/fetch?url=https%3A%2F%2Fuser-secretEndpoint.web.val.run". } By supplying the environment variable in a header, I’m allowed access: With authenticationRun in Val Town ↗ import { fetch } from "https://esm.town/v/std/fetch"; const response = await

Migrating Deprecated HTTP Vals541 words

https://docs.val.town/troubleshooting/migrating-deprecated-http-vals/
request handler, and they’ll be cached between requests: // Expensive initialization or data fetching. const expensiveData = await fetchLargeDataset(); const cache = new Map(); export default async function (req: Request):

Sections

Intentionally caching values for performance!

request handler, and they’ll be cached between requests: // Expensive initialization or data fetching. const expensiveData = await fetchLargeDataset(); const cache = new Map(); export default async function (req: Request):

Upgrade to Deno633 words

https://docs.val.town/upgrading/upgrade-to-deno/
is to make room for the browser-standard Response type that is the result of a fetch request. The following image shows all three types used in parallel: req.body is no

Sections

ExpressJS types moved to express namespace

is to make room for the browser-standard Response type that is the result of a fetch request. The following image shows all three types used in parallel:

Towniesend-message.ts3 matches

@valdottown•Updated 1 hour ago
98 }
99
100 // If there are selected files, fetch their content and add them to the messages
101 if (selectedFiles && selectedFiles.length > 0) {
102 const vt = new ValTown({ bearerToken });
118 fileContents += `## File: ${filePath}\n\`\`\`\n${fileWithLinesNumbers(content)}\n\`\`\`\n\n`;
119 } catch (error) {
120 console.error(`Error fetching file ${filePath}:`, error);
121 fileContents += `## File: ${filePath}\nError: Could not fetch file content\n\n`;
122 }
123 }

Townieusage-dashboard.ts3 matches

@valdottown•Updated 1 hour ago
59 // If we get here, authentication was successful
60
61 // Fetch all rows from the usage table
62 // Fetch all rows from the usage table
63 const allUsageData = await sqlite.execute(`SELECT * FROM ${USAGE_TABLE} ORDER BY timestamp DESC`);
64
65 // Fetch aggregated data grouped by user_id
66 const groupedUsageData = await sqlite.execute(`
67 SELECT

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago