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=320&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 7615 results for "fetch"(700ms)

rpc_examplepost_request1 match

@charmaine•Updated 2 months ago
1const res = await fetch("https://charmaine--f63947e4efa911efbe7fe6cdfca9ef9f.web.val.run/", {
2 method: "POST",
3 body: JSON.stringify({ args: [2, 3] }),

cerebras_coderindex1 match

@huynq•Updated 2 months ago
5async function servePublicFile(path: string): Promise<Response> {
6 const url = new URL("./public/" + path, import.meta.url);
7 const text = await (await fetch(url, {
8 headers: {
9 "User-Agent": "", // to transpile TS to JS

cerebras_coderindex1 match

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

punctualIndigoMeerkatmain.tsx5 matches

@gigmx•Updated 2 months ago
116
117async function sendMessage(content: string) {
118 await fetch(DISCORD_WEBHOOK_URL, {
119 method: "POST",
120 headers: { "Content-Type": "application/json" },
525 const characterClass = prompt('Enter character class:');
526 if (name && characterClass) {
527 const response = await fetch('', {
528 method: 'POST',
529 headers: { 'Content-Type': 'application/json' },
537
538 document.getElementById('simulate').addEventListener('click', async () => {
539 const response = await fetch('', {
540 method: 'POST',
541 headers: { 'Content-Type': 'application/json' },
550
551 async function loadCharacters() {
552 const response = await fetch('/characters');
553 const characters = await response.json();
554 const charactersList = document.getElementById('characters-list');
562
563 async function loadQuests() {
564 const response = await fetch('/quests');
565 const quests = await response.json();
566 const questsList = document.getElementById('quests-list');

hooks_useAiAnalysismain.tsx1 match

@toowired•Updated 2 months ago
10 setIsAnalyzing(true);
11 try {
12 const response = await fetch('/api/analyze', {
13 method: 'POST',
14 headers: {

dailySlackRoundupmain.tsx2 matches

@Scripted•Updated 2 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { getDayName } from "https://esm.town/v/stevekrouse/getDayName?v=2";
3import process from "node:process";
4
5export const dailySlackRoundup = async () => {
6 const res = await fetch(process.env.BRAINBOT_WEBHOOK_URL, {
7 method: "POST",
8 body: JSON.stringify({

cerebras_coderindex1 match

@Priyanshu_23•Updated 2 months ago
5async function servePublicFile(path: string): Promise<Response> {
6 const url = new URL("./public/" + path, import.meta.url);
7 const text = await (await fetch(url, {
8 headers: {
9 "User-Agent": "", // to transpile TS to JS

cerebras_coderindex1 match

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

blogIdeaGeneratorAppmain.tsx3 matches

@melissanf•Updated 2 months ago
44
45 try {
46 const response = await fetch("/generate", {
47 method: "POST",
48 headers: {
68
69 try {
70 const response = await fetch("/generate", {
71 method: "POST",
72 headers: {
96 setIsLoading(true);
97 try {
98 const response = await fetch("/generate-share", {
99 method: "POST",
100 headers: {

saunaTemperatureDashboardmain.tsx6 matches

@jhiller•Updated 2 months ago
94
95 useEffect(() => {
96 async function fetchTemperatures() {
97 try {
98 const response = await fetch("/temperatures");
99 if (!response.ok) {
100 throw new Error(`HTTP error! status: ${response.status}`);
123 }
124 } catch (error) {
125 console.error("Failed to fetch temperatures:", error);
126 setError(error);
127 }
128 }
129
130 fetchTemperatures();
131 const interval = setInterval(fetchTemperatures, 60000);
132 return () => clearInterval(interval);
133 }, []);
348 }
349
350 // Fetch temperatures for dashboard
351 if (request.method === "GET" && new URL(request.url).pathname === "/temperatures") {
352 const result = await sqlite.execute(`

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago