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=385&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 6533 results for "fetch"(1245ms)

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx3 matches

@themostbored•Updated 4 months ago
187 try {
188 // Get coordinates for the city using geocoding
189 const geoResponse = await fetch(\`https://geocoding-api.open-meteo.com/v1/search?name=\${cityInput.value}&count=1&language=en&format=json\`);
190 const geoData = await geoResponse.json();
191
198
199 // Get weather data
200 const weatherResponse = await fetch(\`https://api.open-meteo.com/v1/forecast?latitude=\${latitude}&longitude=\${longitude}&current_weather=true\`);
201 const weatherData = await weatherResponse.json();
202
212 \`;
213 } catch (error) {
214 weatherInfo.innerHTML = '<p class="text-red-500">Error fetching weather data</p>';
215 console.error(error);
216 }

chatgptchessmain.tsx3 matches

@nguyenquangdinh82•Updated 4 months ago
36
37 const { Chess } = await import("https://esm.sh/chess.js@1.0.0-beta.8")
38 const position = (await fetch(`/game/${game_id}`).then(r => r.json())).fen
39 const thinking = document.querySelector("#thinking")
40 thinking.className = "transition-opacity opacity-0"
69 thinking.className = "transition-opacity opacity-100"
70
71 const response = fetch(`/game/${game_id}`, {
72 method: "POST",
73 body: JSON.stringify({ san: move.san }),
278})
279
280export default app.fetch

cerebras_codermain.tsx1 match

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

humbleJadeShrimpmain.tsx1 match

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

valTownChatGPTmain.tsx2 matches

@nguyenquangdinh82•Updated 4 months ago
33
34 // Post the message so we can deal with large text data.
35 await fetch(`/post-message?threadId=${input.getAttribute("data-thread-id")}`, {
36 method: "post",
37 body: msgDiv.textContent,
147 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
148});
149export default app.fetch;

adaptableAquamarineAnteatermain.tsx1 match

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

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx1 match

@laszlo33•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