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/$%7Bart_info.art.src%7D?q=fetch&page=687&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"(2124ms)

val_town_clientmain.tsx1 match

@pomdtr•Updated 1 year ago
1import { paths } from "https://esm.town/v/pomdtr/openapi_schema";
2import createClient2 from "npm:openapi-fetch";
3
4export default function createClient(options?: {

ittyRouterExamplemain.tsx1 match

@vladimyr•Updated 1 year ago
4const router = AutoRouter();
5router.get("/", () => "Hi from itty-router!");
6export default denoServer(router.fetch);

honoExamplemain.tsx1 match

@vladimyr•Updated 1 year ago
5app.get("/", (c) => c.text("Hello from Hono!"));
6app.get("/yeah", (c) => c.text("Routing!"));
7export default denoServer(app.fetch);

oakExamplemain.tsx1 match

@vladimyr•Updated 1 year ago
13app.use(router.routes());
14app.use(router.allowedMethods());
15export default denoServer(app.fetch);

pushplusmain.tsx1 match

@yieldray•Updated 1 year ago
18 timestamp?: number; // ms
19}) {
20 return fetch("http://www.pushplus.plus/send", {
21 method: "POST",
22 headers: { "Content-Type": "application/json" },

deno_servermain.tsx1 match

@pomdtr•Updated 1 year ago
4 }
5 return Object.assign(handler, {
6 fetch: (req) => handler(req),
7 });
8}

denoServermain.tsx1 match

@vladimyr•Updated 1 year ago
4 }
5 return Object.assign(handler, {
6 fetch: (req) => handler(req),
7 });
8}

openAiExamplemain.tsx1 match

@yawnxyz•Updated 1 year ago
64});
65
66export default app.fetch;

stringCodeRunnermain.tsx4 matches

@yawnxyz•Updated 1 year ago
2import { Hono } from "https://deno.land/x/hono@v3.1.3/mod.ts";
3import { jsx } from "https://deno.land/x/hono@v3.1.3/middleware.ts";
4import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
5
6const app = new Hono();
9 const payload = await c.req.json();
10 console.log('evaling using:', Deno.env.get('valtown'))
11 const response = await fetchJSON('https://api.val.town/v1/eval', {
12 method: 'POST',
13 body: JSON.stringify(payload),
55 const payload = { code: this.code };
56 console.log('Sending payload:', payload);
57 const response = await fetch('/eval', {
58 method: 'POST',
59 body: JSON.stringify(payload),
116});
117
118export default app.fetch;

val_town_client_exampleREADME.md1 match

@pomdtr•Updated 1 year ago
1# Typed Client for the Val Town API
2
3Automatically generated using [open-api-typescript](https://www.npmjs.com/package/openapi-typescript) and [openapi-fetch](https://www.npmjs.com/package/openapi-fetch).

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago

FetchBasic1 file match

@fredmoon•Updated 3 weeks ago