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=398&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 7895 results for "fetch"(1173ms)

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx1 match

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

isMyWebsiteDownmain.tsx2 matches

@d17e•Updated 4 months ago
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);

neatBlackSwiftmain.tsx1 match

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

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({

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago