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/?q=fetch&page=437&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 8280 results for "fetch"(8662ms)

WeightTrackermain.tsx1 match

@flymaster•Updated 4 months ago
8 }
9
10 const response = await fetch(`https://ntfy.sh/${ntfyChannel}`, {
11 method: "POST",
12 body: `How much do you weigh?`,

sqliteExplorerAppmain.tsx4 matches

@serdans•Updated 4 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 })));

sqliteExplorerAppmain.tsx4 matches

@wilt•Updated 4 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 })));

anthropicCachingmain.tsx6 matches

@toowired•Updated 4 months ago
30 setLoading(prev => ({ ...prev, [operation]: true }));
31 try {
32 const response = await fetch(`/run?operation=${operation}`, {
33 method: "POST",
34 headers: {
138}
139
140async function fetchContent(): Promise<string> {
141 const response = await fetch("https://www.gutenberg.org/cache/epub/1342/pg1342.txt");
142 const text = await response.text();
143
151 const MODEL_NAME = "claude-3-5-sonnet-20240620";
152
153 const bookContent = await fetchContent();
154 const startTime = Date.now();
155
187 const MODEL_NAME = "claude-3-5-sonnet-20240620";
188
189 const bookContent = await fetchContent();
190 const startTime = Date.now();
191
226 const MODEL_NAME = "claude-3-5-sonnet-20240620";
227
228 const bookContent = await fetchContent();
229 const questions = [
230 "What is the title of this novel?",

cerebras_codermain.tsx1 match

@rahsta•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

significantOrangeCatfishmain.tsx1 match

@fame144•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

authenticBlackWallabymain.tsx1 match

@imwm82•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cerebras_codermain.tsx1 match

@fame144•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

eventsInNYCmain.tsx3 matches

@vawogbemi•Updated 4 months ago
274 useEffect(() => {
275 const checkSubscription = async () => {
276 const response = await fetch('/check-subscription');
277 const data = await response.json();
278 setIsSubscribed(data.isSubscribed);
283 const handleSubscribe = async (email) => {
284 try {
285 const response = await fetch('/subscribe', {
286 method: 'POST',
287 headers: {
311
312 try {
313 const response = await fetch('/submit-event', {
314 method: 'POST',
315 headers: {

communityysubcountmain.tsx7 matches

@vawogbemi•Updated 4 months ago
267 useEffect(() => {
268 const checkSubscription = async () => {
269 const response = await fetch('/check-subscription');
270 const data = await response.json();
271 setIsSubscribed(data.isSubscribed);
273 checkSubscription();
274
275 const fetchSubscriberCount = async () => {
276 const response = await fetch('/subscriber-count');
277 const data = await response.json();
278 setSubscriberCount(data.count);
279 };
280 fetchSubscriberCount();
281 }, []);
282
283 const handleSubscribe = async (email) => {
284 try {
285 const response = await fetch('/subscribe', {
286 method: 'POST',
287 headers: {
296 alert('You have successfully subscribed to NONSENSE NYC!');
297 // Refresh subscriber count
298 const countResponse = await fetch('/subscriber-count');
299 const data = await countResponse.json();
300 setSubscriberCount(data.count);
315
316 try {
317 const response = await fetch('/submit-event', {
318 method: 'POST',
319 headers: {

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago