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/$2?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 13966 results for "fetch"(1636ms)

Migrating Deprecated HTTP Vals557 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):

Runtime153 words

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

Sections

Included environment

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

Permissions935 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

Upgrade to Deno728 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:

SethGodinNewBlogPostNotifierREADME.md1 match

@lanly•Updated 1 hour ago
61. Remix this val
72. Receive updates every time your favorite blog posts, by switching out this URL in the val:
8`await fetch("https://seths.blog/feed/");`

SethGodinNewBlogPostNotifiermain.tsx2 matches

@lanly•Updated 1 hour ago
3export default async function (interval: Interval) {
4 try {
5 const response = await fetch("https://seths.blog/feed/");
6 const feedText = await response.text();
7
22 });
23 } catch (error) {
24 console.error("Error fetching or processing feed:", error);
25 }
26}

FetchBasic2 file matches

@ther•Updated 5 days ago

GithubPRFetcher

@andybak•Updated 1 week ago