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=698&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 8928 results for "fetch"(1103ms)

reloadOnSavemain.tsx2 matches

@stevekrouse•Updated 11 months ago
37
38/**
39 * @param handler http val's fetch handler
40 * @param vals to watch
41 */
42export function reloadOnSaveFetchMiddleware(
43 handler: (req: Request) => Response | Promise<Response>,
44 vals = [rootValRef()],

warningsmain.tsx1 match

@nws•Updated 11 months ago
9
10 async latest(warning_type: WarningType): Promise<Warning> {
11 const features = await fetch(this.endpoint + warning_type + " Warning&limit=1").then(res => res.json())
12 .then(res => res.features);
13

reproduceResolveModuleErrormain.tsx1 match

@janpaul123•Updated 11 months ago
5// Copied from https://www.val.town/v/sqlite/db
6async function execute(statement: InStatement): Promise<ResultSet> {
7 const resp = await fetch("https://janpaul123-dummyjustproxylibsql.web.val.run", {
8 method: "POST",
9 body: JSON.stringify({

sqliteExplorerAppmain.tsx4 matches

@zcribe•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
15import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=70";
16import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
17import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
18import { Hono } from "npm:hono";
19import type { FC } from "npm:hono/jsx";
174});
175
176export const handler = app.fetch;
177export default iframeHandler(modifyFetchHandler(passwordAuth(handler)));

dynamicFormInputmain.tsx1 match

@yawnxyz•Updated 11 months ago
74});
75
76export default app.fetch;

safeMessageBoardmain.tsx5 matches

@jahabeebs•Updated 11 months ago
30 event.preventDefault();
31 const formData = new FormData(form);
32 const response = await fetch('/', {
33 method: 'POST',
34 body: formData,
43 event.preventDefault();
44 const formData = new FormData(form);
45 const response = await fetch('/', {
46 method: 'POST',
47 body: formData,
134 event.preventDefault();
135 const formData = new FormData(form);
136 const response = await fetch('/', {
137 method: 'POST',
138 body: formData,
147 event.preventDefault();
148 const formData = new FormData(form);
149 const response = await fetch('/', {
150 method: 'POST',
151 body: formData,
217});
218
219export default valTownBadge(app.fetch, import.meta.url);

freeformServermain.tsx1 match

@pomdtr•Updated 11 months ago
31});
32
33export default app.fetch;

tanLadybugmain.tsx5 matches

@stevekrouse•Updated 11 months ago
30 event.preventDefault();
31 const formData = new FormData(form);
32 const response = await fetch('/', {
33 method: 'POST',
34 body: formData,
43 event.preventDefault();
44 const formData = new FormData(form);
45 const response = await fetch('/', {
46 method: 'POST',
47 body: formData,
135 event.preventDefault();
136 const formData = new FormData(form);
137 const response = await fetch('/', {
138 method: 'POST',
139 body: formData,
148 event.preventDefault();
149 const formData = new FormData(form);
150 const response = await fetch('/', {
151 method: 'POST',
152 body: formData,
219});
220
221export default valTownBadge(app.fetch, import.meta.url);

smsmain.tsx1 match

@pomdtr•Updated 11 months ago
26});
27
28export default app.fetch;

ocaps_inkmain.tsx7 matches

@zarutian•Updated 11 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
3
4export const ocaps_ink = async (req) => {
6 const valvers = 200;
7 const [ink_js_src, story_ink, visitors_info_txt] = await Promise.all([
8 fetchText(
9 // "https://raw.githubusercontent.com/y-lohse/inkjs/master/templates/browser_serverless/ink.js",
10 "https://unpkg.com/inkjs@2.2.1/dist/ink-full.js",
11 ),
12 fetchText(
13 "https://gist.githubusercontent.com/zarutian/ec15de4eb4780ae6e6c8f7ad1d2d49f6/raw/ocaps.ink",
14 {
16 },
17 ),
18 fetchText(
19 // "https://zarutian-ocaps_ink_visitors.express.val.run",
20 "https://zarutian-ocaps_ink_visitors.web.val.run/",
273 return a.toString().concat(b.toString());
274 });
275 _inkStory.BindExternalFunction("urlfetch", (url) => {
276 throw new Error("Not yet implemented!");
277 });
294 });
295 _inkStory.BindExternalFunction("urlpost", (url, payload) => {
296 const response_p = fetch(url, {
297 method: "POST",
298 cache: "no-cache",

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago

FetchBasic1 file match

@fredmoon•Updated 3 weeks ago