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/$%7Burl%7D?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 8136 results for "fetch"(687ms)

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:

slack-prgithub-pr-inherit-labels.ts10 matches

@charmaineβ€’Updated 6 hours ago
108 console.log("πŸ” Current PR labels:", currentLabels);
109
110 // Fetch labels from all linked issues
111 const repo = payload.repository.full_name;
112 let allIssueLabels: string[] = [];
113
114 for (const issueNumber of issueNumbers) {
115 console.log(`πŸ” Fetching labels for issue #${issueNumber}`);
116 try {
117 const issue = await fetchIssue(repo, issueNumber);
118 const issueLabels = issue.labels.map(label => label.name);
119 console.log(`πŸ” Labels for issue #${issueNumber}:`, issueLabels);
126 }
127 } catch (error) {
128 console.error(`❌ Error fetching issue #${issueNumber}:`, error);
129 // Continue with other issues even if one fails
130 }
190}
191
192// Fetch issue details
193async function fetchIssue(repo: string, issueNumber: number): Promise<GitHubIssue> {
194 const token = Deno.env.get("GITHUB_TOKEN");
195
199
200 const url = `https://api.github.com/repos/${repo}/issues/${issueNumber}`;
201 console.log("πŸ” Fetching issue from:", url);
202
203 const response = await fetch(url, {
204 headers: {
205 "Authorization": `token ${token}`,
221 console.error("❌ GitHub API error text:", errorText);
222 }
223 throw new Error(`Failed to fetch issue: ${errorMessage}`);
224 }
225
240 console.log("πŸ” Sending labels update request to:", url);
241
242 const response = await fetch(url, {
243 method: "POST",
244 headers: {

slack-prREADME.md1 match

@charmaineβ€’Updated 6 hours ago
712. This Val filters for approval events
723. When an approval is detected, it:
73 - Fetches detailed PR information
74 - Checks if the PR is mergeable and all required checks are passing
75 - Sends a formatted message to Slack

fetchPaginatedData2 file matches

@nbbaierβ€’Updated 1 week ago

FetchBasic1 file match

@fredmoonβ€’Updated 1 week ago