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=340&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 5567 results for "fetch"(589ms)

legalAssistantmain.tsx1 match

@websrai•Updated 4 months ago
31
32 try {
33 const serverResponse = await fetch("/query", {
34 method: "POST",
35 body: JSON.stringify({ query }),

seoKeywordResearchToolmain.tsx12 matches

@websrai•Updated 4 months ago
30
31 useEffect(() => {
32 fetchUserData();
33 fetchAd();
34 }, []);
35
36 const fetchUserData = async () => {
37 const response = await fetch("/user");
38 const userData = await response.json();
39 setUser(userData);
42 };
43
44 const fetchAd = async () => {
45 const response = await fetch("/ad");
46 const adData = await response.json();
47 setAdContent(adData.content);
52 setIsLoading(true);
53 try {
54 const response = await fetch("/generate", {
55 method: "POST",
56 headers: { "Content-Type": "application/json" },
62 } else {
63 setGeneratedContent(data.content);
64 fetchUserData(); // Refresh user data to update usage
65 }
66 } catch (error) {
72
73 const handleUpgrade = async (tier) => {
74 const response = await fetch("/upgrade", {
75 method: "POST",
76 headers: { "Content-Type": "application/json" },
79 const data = await response.json();
80 if (data.success) {
81 fetchUserData();
82 } else {
83 alert("Upgrade failed. Please try again.");
98
99 const updateUserSettings = async (settings) => {
100 const response = await fetch("/updateSettings", {
101 method: "POST",
102 headers: { "Content-Type": "application/json" },
105 const data = await response.json();
106 if (data.success) {
107 fetchUserData();
108 } else {
109 alert("Failed to update settings. Please try again.");

neatBlackSwiftmain.tsx1 match

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

spaceTradersStatusTablemain.tsx4 matches

@keo•Updated 4 months ago
8
9 useEffect(() => {
10 async function fetchStatus() {
11 try {
12 const response = await fetch('https://api.spacetraders.io/v2/');
13 if (!response.ok) throw new Error('Failed to fetch status');
14 const data = await response.json();
15 setStatus(data);
18 }
19 }
20 fetchStatus();
21 }, []);
22

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx1 match

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

isMyWebsiteDownmain.tsx2 matches

@dihmeetree•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)`);

cerebras_codermain.tsx1 match

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

telegramAudioMessageTranscriptionmain.tsx1 match

@artem•Updated 4 months ago
69
70 try {
71 const response = await fetch("/transcribe", {
72 method: "POST",
73 body: formData,

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago