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/?q=fetch&page=542&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 8238 results for "fetch"(1657ms)

outsideGreenCamelmain.tsx1 match

@pomdtr•Updated 7 months ago
1import * as esbuild from "https://deno.land/x/esbuild@v0.24.0/wasm.js";
2
3const resp = await fetch(import.meta.url);
4const ts: string = await resp.text();
5

blob_adminmain.tsx2 matches

@synapticrobotics•Updated 7 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));

hiddenVioletMockingbirdmain.tsx3 matches

@all•Updated 7 months ago
242 sequence: document.getElementById("sequence").value
243 };
244 await fetch('/save-config', {
245 method: 'POST',
246 headers: { 'Content-Type': 'application/json' },
252 // Load configuration list
253 async function loadConfigList() {
254 const response = await fetch('/config-list');
255 const configs = await response.json();
256 const configList = document.getElementById("configList");
268 const configName = document.getElementById("configList").value;
269 if (!configName) return;
270 const response = await fetch(\`/load-config/\${configName}\`);
271 const config = await response.json();
272 synth.oscillator.type = config.oscType;

BalanceCapMonstermain.tsx3 matches

@augustohp•Updated 7 months ago
1import fetchBalanceFromCaptchaProvider from "https://esm.town/v/augustohp/CaptchaGetBalance";
2
3export default async function fetchAntiCaptchaBalance(
4 token: string,
5): Promise<number> {
6 return await fetchBalanceFromCaptchaProvider(token, "capmonster");
7}

BalanceAntiCaptchamain.tsx3 matches

@augustohp•Updated 7 months ago
1import fetchBalanceFromCaptchaProvider from "https://esm.town/v/augustohp/CaptchaGetBalance";
2
3export default async function fetchAntiCaptchaBalance(
4 token: string,
5): Promise<number> {
6 return await fetchBalanceFromCaptchaProvider(token, "anticaptcha");
7}

CaptchaGetBalancemain.tsx4 matches

@augustohp•Updated 7 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export default async function fetchBalanceFromCaptchaProvider(
4 token: string,
5 provider: "capmonster" | "anticaptcha" | "nextcaptcha",
15 throw new Error("Unrecognized captcha provider " + provider + "!");
16 }
17 const result = await fetchJSON(
18 endpointUrl,
19 {
26
27 if (result.errorId != 0) {
28 throw new Error("Could not fetch balance.");
29 }
30

CaptchaGetBalanceREADME.md2 matches

@augustohp•Updated 7 months ago
10
11```typescript
12import fetchBalanceFromCaptchaProvider from "https://esm.town/v/augustohp/CaptchaGetBalance";
13const remainingBalance = await fetchBalanceFromCaptchaProvider(Deno.env.get("CAPMONSTER_KEY"), "capmonster");
14```
15

v3FanFicScrapermain.tsx2 matches

@willthereader•Updated 7 months ago
14 setLoading(true);
15 try {
16 const response = await fetch("/scrape", {
17 method: "POST",
18 headers: { "Content-Type": "application/json" },
79 const { url } = await request.json();
80 try {
81 const response = await fetch(url);
82 const content = await response.text();
83 return new Response(JSON.stringify({ content: content.slice(0, 1000) }), {

distinctGoldLarkmain.tsx2 matches

@temptemp•Updated 7 months ago
13const apiUrl = "https://filehaus.top/api/upload/data.json"; // Replace with your API URL
14
15// Send the file using fetch
16try {
17 const response = await fetch(apiUrl, {
18 method: "POST",
19 body: formData,

XKCDComicOfTheDaymain.tsx3 matches

@wolf•Updated 7 months ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
2import { load } from "npm:cheerio";
3
4export default async function(req: Request): Promise<Response> {
5 const response = await fetchText("https://xkcd.com/");
6 const $ = load(response);
7 const image = $("div#comic img").attr("src");
8 return new Response(await (await fetch(image)).arrayBuffer());
9}

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago