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/$%7Bsuccess?q=fetch&page=680&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 8667 results for "fetch"(1305ms)

tanCranemain.tsx1 match

@frmysantana•Updated 11 months ago
3export default async function tacoBellNutritionScrapper(req) {
4 const sourceUrl = `https://www.nutritionix.com/taco-bell/menu/premium`;
5 const siteText = await fetch(sourceUrl);
6 const $ = cheerio.load(await siteText.text());
7 const items = $("tr.odd, tr.even").map((i, e) => {

spotifyAPImain.tsx2 matches

@HuskyChicken•Updated 11 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let spotifyAPI = ({token, endpoint, ...params}) => fetchJSON(
4 `https://api.spotify.com/v1/${endpoint}?${new URLSearchParams(params)}`,
5 {

rawmain.tsx3 matches

@pomdtr•Updated 11 months ago
5async function createScreenshot(code: string) {
6 const apiUrl = "https://sourcecodeshots.com/api/image";
7 const resp = await fetch(apiUrl, {
8 method: "POST",
9 headers: {
39 }
40 }
41 const resp = await fetch(`https://api.val.town/v1/alias/${author}/${name}`, {
42 headers,
43 });
49 if (url.searchParams.has("v")) {
50 const version = url.searchParams.get("v");
51 const resp = await fetch(
52 `https://api.val.town/v1/vals/${val.id}/versions/${version}`,
53 { headers },

cors_proxymain.tsx2 matches

@adrienj•Updated 11 months ago
52 };
53
54 // Perform the fetch request to the destination URL
55 const response = await fetch(destUrlString, init);
56
57 // Return the response from the destination URL, including CORS headers

esmTownmain.tsx2 matches

@jdan•Updated 12 months ago
4
5function esmTown(url) {
6 return fetch(url, {
7 headers: {
8 "User-Agent":
13
14const app = new Hono();
15export default app.fetch;
16
17app.get("/", async (c) => {

esmTownREADME.md1 match

@jdan•Updated 12 months ago
22const allWords = await Promise.all(
23 dictionaryUrls.map(async (url) => {
24 const res = await fetch(url);
25 const words = await res.json();
26 return words.map((entry) => entry.word);

companiesHousePublicDatamain.tsx1 match

@aeaton•Updated 12 months ago
5 const apiKey = Deno.env.get("companiesHouseApiKey");
6 const basicAuth = btoa(apiKey + ":");
7 const response = await fetch(apiUrl, {
8 headers: { Authorization: `Basic ${basicAuth}` },
9 });

emojiGuessrmain.tsx2 matches

@jdan•Updated 12 months ago
7
8function esmTown(url) {
9 return fetch(url, {
10 headers: {
11 "User-Agent":
16
17const app = new Hono();
18export default app.fetch;
19
20app.get("/", async (c) =>

honoExamplemain.tsx1 match

@willthereader•Updated 12 months ago
74 ));
75app.get("/yeah", (c) => c.html("Routing!"));
76export default app.fetch;

reppmain.tsx3 matches

@maxm•Updated 12 months ago
11blob.setJSON;
12
13const fetch = async (req: Request): Promise<Response> => {
14 let repp = new Repp([{
15 code: "",
165}
166
167export default fetch;
168// https://stackoverflow.com/a/67394423/1333724
169// var __EVAL = async (s) => eval(`(async () => (void (__EVAL = ${__EVAL.toString()}); ${s}))()`);
173// // evaluate("ten + cube(3)");
174// evaluate(`
175// let resp = await fetch('https://www.google.com');
176// console.log(resp)
177// let x = 10

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago

FetchBasic1 file match

@fredmoon•Updated 3 weeks ago