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/image-url.jpg?q=fetch&page=1113&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 13197 results for "fetch"(2927ms)

valceptionmain.tsx1 match

@iamseeley•Updated 11 months ago
54});
55
56export default app.fetch;
57

fuchsiaSnipemain.tsx1 match

@tmcw•Updated 11 months ago
1export default async function(req: Request): Promise<Response> {
2 const response = await fetch("http://worldtimeapi.org/api/timezone/America/New_York")
3 const timeData = await response.json()
4

resumeConfigmain.tsx1 match

@ajax•Updated 11 months ago
5
6export const resumeConfig = {
7 // URL to fetch the resume JSON data. This should point to your raw resume JSON.
8 // If you want to host your resume JSON somewhere I recommend a setup like this on val town (https://www.val.town/v/iamseeley/resumeDetails) or a github gist.
9 // You can test out the resume view using my resume: https://iamseeley-resumedetails.web.val.run

imageMagickWasmExamplemain.tsx1 match

@maxm•Updated 11 months ago
7} from "https://esm.sh/@imagemagick/magick-wasm";
8
9const resp = await fetch("https://esm.sh/@imagemagick/magick-wasm@0.0.29/dist/magick.wasm");
10const wasmBytes = await resp.arrayBuffer();
11

nestedValmain.tsx1 match

@iamseeley•Updated 11 months ago
10 );
11});
12export default app.fetch;

formLogicmain.tsx1 match

@iamseeley•Updated 11 months ago
119 };
120
121 const response = await fetch('/generate-image', {
122 method: 'POST',
123 headers: {

cmdk_commandmain.tsx8 matches

@pomdtr•Updated 11 months ago
1#!/usr/bin/env -S deno serve --allow-all --env --watch
2
3import { fetchAPI } from "https://esm.town/v/pomdtr/fetchAPI?v=4";
4import { Hono } from "npm:hono";
5
8
9app.get("/", async (c) => {
10 const resp = await fetchAPI("/v1/me", {
11 token,
12 });
51app.get("/vals/list", async (c) => {
52 const userID = c.req.query("user");
53 const resp = await fetchAPI(`/v1/users/${userID}/vals`, {
54 token,
55 paginate: true,
103app.get("/vals/view", async (c) => {
104 const valID = c.req.query("val");
105 const resp = await fetchAPI(`/v1/vals/${valID}`, {
106 token,
107 });
128 const { name, code, privacy, type, val } = await c.req.json();
129
130 await fetchAPI(`/v1/vals/${val}`, {
131 method: "PATCH",
132 token,
200 const { name, code, privacy, type } = await c.req.json();
201
202 const resp = await fetchAPI("/v1/vals", {
203 method: "POST",
204 token,
271app.post("/vals/delete", async (c) => {
272 const { reload, val } = await c.req.json();
273 const resp = await fetchAPI(`/v1/vals/${val}`, {
274 method: "DELETE",
275 token,
294});
295
296export default app.fetch;

realtimeFormLogicmain.tsx1 match

@iamseeley•Updated 11 months ago
25
26 try {
27 const response = await fetch('/realtime-generate-image', {
28 method: 'POST',
29 headers: {

fetchAPImain.tsx3 matches

@pomdtr•Updated 11 months ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2
3export async function fetchAPI(
4 path: string,
5 options?: RequestInit & {
15
16 while (true) {
17 const resp = await fetch(url, {
18 headers: {
19 ...options?.headers,
42 }
43
44 return fetch(`${API_URL}${path}`, {
45 ...options,
46 headers: {

obsidianPluginsmain.tsx3 matches

@danielkerrigan•Updated 11 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3const plugins = await fetchJSON(
4 "https://raw.githubusercontent.com/obsidianmd/obsidian-releases/HEAD/community-plugins.json",
5);
6
7const stats = await fetchJSON(
8 "https://raw.githubusercontent.com/obsidianmd/obsidian-releases/HEAD/community-plugin-stats.json",
9);

GithubPRFetcher

@andybak•Updated 1 hour ago

proxiedfetch1 file match

@jayden•Updated 21 hours ago