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=690&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 8997 results for "fetch"(2270ms)

blob_adminmain.tsx2 matches

@vhmartinezm•Updated 11 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";
133});
134
135export default modifyFetchHandler(passwordAuth(app.fetch));

dnsmain.tsx1 match

@stevekrouse•Updated 11 months ago
4
5const app = new Hono();
6export default valTownBadgeMiddleware(app.fetch, import.meta.url);
7app.get("/", (c) => {
8 return c.html(

cyanGuppymain.tsx9 matches

@niek•Updated 11 months ago
2import { home, scopesRoute } from "https://esm.town/v/hunty/spotify_helpers";
3import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
4import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
5import { querystring } from "https://esm.town/v/stevekrouse/querystring";
6import { thisWebURL } from "https://esm.town/v/stevekrouse/thisWebURL";
25
26export let spotifyRequestToken = ({ client_id, client_secret, code, redirect_uri }) =>
27 fetchJSON("https://accounts.spotify.com/api/token", {
28 method: "POST",
29 body: querystring({
39
40export let spotifyRefreshToken = async ({ refresh_token, client_id, client_secret }) =>
41 fetch("https://accounts.spotify.com/api/token", {
42 method: "POST",
43 body: new URLSearchParams({
193
194 try {
195 const currentlyPlaying = await fetch("https://api.spotify.com/v1/me/player/currently-playing", {
196 method: "GET",
197 headers: {
209
210 if (!mostRecentTrack) {
211 const recentTracks = await fetch("https://api.spotify.com/v1/me/player/recently-played", {
212 method: "GET",
213 headers: {
222 }
223 catch (e) {
224 return c.json({ error: "Fetch Error" + e });
225 }
226});
234
235 try {
236 const playStateResponse = await fetch("https://api.spotify.com/v1/me/player?market=US", {
237 method: "GET",
238 headers: {
253 }
254 catch (e) {
255 return c.json({ error: "Fetch Error" + e });
256 }
257});
258
259export default app.fetch;

huggingfacePipelinemain.tsx1 match

@yawnxyz•Updated 11 months ago
93 async callHuggingFaceAPI(payload, options) {
94 try {
95 const response = await fetch(`${HUGGING_FACE_API_URL}/${this.model}`, {
96 method: "POST",
97 headers: {

ragwithclaude_uimain.tsx2 matches

@yawnxyz•Updated 11 months ago
64app.get("/get-answer", async (c) => {
65 const question = c.req.query("question");
66 const response = await fetch(`https://simonw-ragwithclaude.web.val.run/?question=${encodeURIComponent(question)}`);
67 const answer = await response.text();
68 return c.html(answer);
69});
70
71export default app.fetch;

yellowSpidermain.tsx2 matches

@stevekrouse•Updated 11 months ago
1import { jsPython } from "npm:jspython-interpreter";
2const interpreter = jsPython()
3 .addFunction("fetch", fetch);
4const script = `
5 print(fetch("https://datasette.simonwillison.net/simonwillisonblog/blog_quotation.json?_labels=on&_shape=objects").text())
6`;
7await interpreter.evaluate(script);

blushAardwolfmain.tsx3 matches

@stevekrouse•Updated 11 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3const blog_bookmark = await fetchJSON(
4 "https://datasette.simonwillison.net/simonwillisonblog/blog_blogmark.json?_labels=on&_shape=objects",
5);
6
7const blog_quotation = await fetchJSON(
8 "https://datasette.simonwillison.net/simonwillisonblog/blog_quotation.json?_labels=on&_shape=objects",
9);

cmdkmain.tsx1 match

@pomdtr•Updated 11 months ago
3const app = createApp(Deno.env.get("valtown"));
4
5export default app.fetch;

date_me_formmain.tsx2 matches

@vawogbemi•Updated 11 months ago
3import { sqlite } from "https://esm.town/v/std/sqlite?v=5";
4import date_me_doc_locations from "https://esm.town/v/stevekrouse/date_me_doc_locations";
5import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
6import Layout from "https://esm.town/v/vawogbemi/dateme_layout";
7import { Hono } from "npm:hono@3";
196form.get("/", Form);
197form.post("/", Submit);
198export default reloadOnSaveFetchMiddleware(form.fetch);

sqliteExplorerAppmain.tsx4 matches

@vawogbemi•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";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

TAC_FetchBasic2 file matches

@A7_OMC•Updated 4 hours ago

hn-fetch1 file match

@matija•Updated 6 hours ago