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=390&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 7882 results for "fetch"(1510ms)

xoGameWithDifficultyLevelsmain.tsx1 match

@ask0ne•Updated 3 months ago
81 setIsAIThinking(true);
82 try {
83 const response = await fetch("/ai-move", {
84 method: "POST",
85 headers: {

pythonLearningAppmain.tsx1 match

@mrshorts•Updated 3 months ago
20
21 try {
22 const response = await fetch(window.location.origin + '/generate-python-help', {
23 method: 'POST',
24 headers: {

swiftCoralMulemain.tsx1 match

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

FHworldmain.tsx5 matches

@Fahad61814•Updated 3 months ago
9
10 useEffect(() => {
11 async function fetchWeather() {
12 try {
13 setLoading(true);
14 const response = await fetch(
15 `https://api.open-meteo.com/v1/forecast?latitude=${location.latitude}&longitude=${location.longitude}&current_weather=true&hourly=temperature_2m,relativehumidity_2m,windspeed_10m`,
16 );
19 setLoading(false);
20 } catch (error) {
21 console.error("Weather fetch error:", error);
22 setLoading(false);
23 }
24 }
25
26 fetchWeather();
27 }, [location]);
28
33
34 if (loading) return <div>Loading weather data...</div>;
35 if (!weatherData) return <div>Unable to fetch weather</div>;
36
37 return (

selflessBlackEarthwormmain.tsx1 match

@webandapktesting•Updated 3 months ago
34 try {
35 const endpoint = isLogin ? '/login' : '/signup';
36 const response = await fetch(endpoint, {
37 method: 'POST',
38 headers: { 'Content-Type': 'application/json' },

vibrantGoldHoverflymain.tsx1 match

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

cerebras_codermain.tsx1 match

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

chatAppmain.tsx9 matches

@ahmed9ali•Updated 3 months ago
15 e.preventDefault();
16 try {
17 const response = await fetch('/login', {
18 method: 'POST',
19 headers: { 'Content-Type': 'application/json' },
43
44 try {
45 const response = await fetch('/upload', {
46 method: 'POST',
47 body: formData
50 if (data.success) {
51 alert('File uploaded successfully');
52 fetchUploadedFiles();
53 }
54 } catch (error) {
59 const generateLoginCode = async () => {
60 try {
61 const response = await fetch('/generate-code', { method: 'POST' });
62 const data = await response.json();
63 setGeneratedCode(data.code);
67 };
68
69 const fetchUploadedFiles = async () => {
70 try {
71 const response = await fetch('/files');
72 const data = await response.json();
73 setUploadedFiles(data);
74 } catch (error) {
75 console.error('Failed to fetch files', error);
76 }
77 };
79 useEffect(() => {
80 if (isAdmin) {
81 fetchUploadedFiles();
82 }
83 }, [isAdmin]);
269 }
270
271 // Fetch files
272 if (request.method === 'GET' && new URL(request.url).pathname === '/files') {
273 const result = await sqlite.execute(`

sqlitemain.tsx2 matches

@partlysunny•Updated 3 months ago
35
36async function execute(statement: InStatement, args?: InArgs): Promise<ResultSet> {
37 const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38 method: "POST",
39 headers: {
50
51async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
52 const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
53 method: "POST",
54 headers: {

cerebras_codermain.tsx1 match

@bbohra•Updated 3 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