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/$1?q=fetch&page=2&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 10806 results for "fetch"(899ms)

datemejoin2 matches

@omikron•Updated 3 hours ago
2import { email } from "https://esm.town/v/std/email?v=11";
3import { sqlite } from "https://esm.town/v/std/sqlite?v=5";
4import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
5import { Hono } from "npm:hono@3";
6import locations from "../locations.json" with { type: "json" };
224join.get("/", Form);
225join.post("/", Submit);
226export default reloadOnSaveFetchMiddleware(join.fetch);

datemeindex1 match

@omikron•Updated 3 hours ago
12app.get("/faq", faq);
13app.get("/rss.xml", c => rss(c.req.raw));
14export default app.fetch;

cerebras_coderindex.ts1 match

@Downchuck•Updated 4 hours ago
149
150 try {
151 const response = await fetch("/", {
152 method: "POST",
153 body: JSON.stringify({

spreadchatsheets-import.ts1 match

@twitchard•Updated 5 hours ago
1// This file would contain the actual Google Sheets import functionality
2// For a complete implementation, we would need to:
3// 1. Use the Google Sheets API to fetch sheet data
4// 2. Convert the data to a format compatible with x-spreadsheet
5// 3. Return the formatted data

scrape-amazon-reviewsindex.ts4 matches

@metaphysics0•Updated 5 hours ago
61 const reviewsUrl = `https://www.amazon.com/product-reviews/${productId}/ref=cm_cr_arp_d_paging_btm_next_${page}?ie=UTF8&reviewerType=all_reviews&pageNumber=${page}`;
62
63 const response = await fetch(reviewsUrl, {
64 headers: {
65 'User-Agent': userAgent,
73
74 if (!response.ok) {
75 console.log(`Failed to fetch page ${page}: ${response.status}`);
76 break;
77 }
131
132 } catch (error) {
133 console.log(`Error fetching page ${page}:`, error);
134 break;
135 }
209});
210
211export default app.fetch;

x402-democlient.tsx3 matches

@stevedylandev•Updated 5 hours ago
1import { decodeXPaymentResponse, wrapFetchWithPayment } from "npm:x402-fetch";
2import { privateKeyToAccount } from "npm:viem/accounts";
3
5const account = privateKeyToAccount(PRIVATE_KEY as `0xstring`);
6
7const fetchWithPayment = wrapFetchWithPayment(fetch, account);
8
9const url = "https://stevedylandev--100deaa43be911f0af859e149126039e.web.val.run/joke";
10
11async function main() {
12 const response = await fetchWithPayment(url);
13 if (!response.ok) {
14 const message = await response.text();

x402-demoserver.tsx1 match

@stevedylandev•Updated 5 hours ago
41});
42
43export default app.fetch;

tourguideindex.ts1 match

@neverstew•Updated 6 hours ago
21app.get("/health", c => c.json({ status: "ok", timestamp: new Date().toISOString() }));
22
23export default app.fetch;

tourguideSearchForm.tsx1 match

@neverstew•Updated 6 hours ago
53
54 try {
55 const response = await fetch('/api/itinerary/generate', {
56 method: 'POST',
57 headers: { 'Content-Type': 'application/json' },

tourguideApp.tsx4 matches

@neverstew•Updated 6 hours ago
51 try {
52 setState(prev => ({ ...prev, isLoading: true }));
53 const response = await fetch('/api/itinerary');
54 const result = await response.json();
55
87 try {
88 // Check for existing progress
89 const response = await fetch(`/api/itinerary/${itinerary.id}/progress`);
90 const result = await response.json();
91
119
120 try {
121 await fetch(`/api/itinerary/${progress.itineraryId}/progress`, {
122 method: 'POST',
123 headers: { 'Content-Type': 'application/json' },
131 const handleDeleteItinerary = async (id: string) => {
132 try {
133 const response = await fetch(`/api/itinerary/${id}`, {
134 method: 'DELETE'
135 });

HN-fetch-call2 file matches

@ImGqb•Updated 9 hours ago
fetch HackerNews by API

FRAMERFetchBasic1 file match

@bresnik•Updated 1 day ago