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/$%7Bart_info.art.src%7D?q=fetch&page=65&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 8523 results for "fetch"(789ms)

cerebras_coderindex.ts1 match

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

berlin-explorerclient.ts5 matches

@squiddy•Updated 1 week ago
37
38 this.initializeDOM();
39 this.fetchExploredNeighborhoods();
40 }
41
102 }
103
104 async fetchExploredNeighborhoods() {
105 try {
106 const response = await fetch("/get-explored-neighborhoods");
107 const data = await response.json();
108 this.exploredNeighborhoods = data.explored;
109 this.updateUI();
110 } catch (error) {
111 console.error("Failed to fetch explored neighborhoods", error);
112 }
113 }
134 async toggleNeighborhood(neighborhoodName) {
135 try {
136 const response = await fetch("/toggle-neighborhood", {
137 method: "POST",
138 headers: { "Content-Type": "application/json" },

berlin-explorerindex.html3 matches

@squiddy•Updated 1 week ago
98 async function loadExploredNeighborhoods() {
99 try {
100 const response = await fetch(GET_ENDPOINT);
101 const data = await response.json();
102 knownNeighborhoods = data.neighborhoods || [];
120 };
121
122 await fetch(UPDATE_ENDPOINT, {
123 method: 'POST',
124 headers: {
239 try {
240 // Load Berlin neighborhood data
241 const response = await fetch('https://raw.githubusercontent.com/madisonwalker/berlin-neighbourhoods/main/berlin_neighbourhoods.geojson');
242 const data = await response.json();
243

RodneyslinearStandupmain.tsx6 matches

@rodneydanger84•Updated 1 week ago
65 const { startDate, endDate } = getYesterdayDateRange();
66
67 const response = await fetch("https://api.linear.app/graphql", {
68 method: "POST",
69 headers: {
80
81 if (data.errors) {
82 console.error("Error fetching data from Linear API:", data.errors);
83 Deno.exit(1);
84 }
86 const issues = data.data.viewer.assignedIssues.nodes;
87
88 // Group issues by team and fetch issue history
89 const issuesByTeam: { [teamName: string]: any[] } = {};
90 for (const issue of issues) {
94 }
95
96 const historyResponse = await fetch("https://api.linear.app/graphql", {
97 method: "POST",
98 headers: {
110 if (historyData.errors) {
111 console.error(
112 `Error fetching history for issue ${issue.id}:`,
113 historyData.errors,
114 );
190 }
191
192 const slackResponse = await fetch("https://slack.com/api/chat.postMessage", {
193 method: "POST",
194 headers: {

linearStandupmain.tsx6 matches

@rodneydanger84•Updated 1 week ago
65 const { startDate, endDate } = getYesterdayDateRange();
66
67 const response = await fetch("https://api.linear.app/graphql", {
68 method: "POST",
69 headers: {
80
81 if (data.errors) {
82 console.error("Error fetching data from Linear API:", data.errors);
83 Deno.exit(1);
84 }
86 const issues = data.data.viewer.assignedIssues.nodes;
87
88 // Group issues by team and fetch issue history
89 const issuesByTeam: { [teamName: string]: any[] } = {};
90 for (const issue of issues) {
94 }
95
96 const historyResponse = await fetch("https://api.linear.app/graphql", {
97 method: "POST",
98 headers: {
110 if (historyData.errors) {
111 console.error(
112 `Error fetching history for issue ${issue.id}:`,
113 historyData.errors,
114 );
190 }
191
192 const slackResponse = await fetch("https://slack.com/api/chat.postMessage", {
193 method: "POST",
194 headers: {

guide2main.tsx1 match

@salon•Updated 1 week ago
164 return generatedData;
165 } catch (error) {
166 console.error("Error fetching or processing data from OpenAI:", error);
167 console.warn("Using fallback race data due to the error.");
168 return fallbackRaceData.slice(0, numToRequest).map(race => ({

snippetscheerio_html_parsing.tsx1 match

@chadparker•Updated 1 week ago
2
3export default async function handler() {
4 const response = await fetch("https://chadparker.com");
5 const body = await response.text();
6 const $ = cheerio.load(body);

Autoblocks_BotautoblocksSlackBot.http.val.ts3 matches

@haroon•Updated 1 week ago
36
37async function createTopic(): Promise<string> {
38 const res = await fetch(`${BASE}/topic`, { method: "POST", headers: AUTH_HDR });
39 if (!res.ok) throw new Error(`Mintlify /topic ${res.status}: ${await res.text()}`);
40 return (await res.json()).topicId;
42
43async function askMintlify(topicId: string, message: string): Promise<string> {
44 const res = await fetch(`${BASE}/message`, {
45 method: "POST",
46 headers: { "Content-Type": "application/json", ...AUTH_HDR },
95
96 /* Post nicely formatted message */
97 const slackRes = await fetch("https://slack.com/api/chat.postMessage", {
98 method: "POST",
99 headers: {

lite-britelitebrite.ts1 match

@defunkt•Updated 1 week ago
43 btn.disabled=true;
44 const q=encodeURIComponent(inp.value||"smiley face");
45 const r=await fetch("./draw?prompt="+q);
46 const {pegs}=await r.json();
47 ctx.fillStyle="#000";ctx.fillRect(0,0,cvs.width,cvs.height);

cerebras_coderindex.ts1 match

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

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago