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/$%7Burl%7D?q=fetch&page=663&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 9172 results for "fetch"(1906ms)

VALLErunmain.tsx2 matches

@ejfox•Updated 8 months ago
918 code: newCode,
919 });
920 fetch('/save', { method: "POST", body }).then(() => {
921 document.getElementById('code-input-hidden').value = newCode;
922 document.getElementById('preview-iframe').src += '';
1284 app.post("/", mainHandler);
1285
1286 return passwordAuth(app.fetch, { verifyPassword: verifyToken });
1287}

privategooglenewsmain.tsx1 match

@dglazkov•Updated 8 months ago
53
54const getNews = async ({ query }: { query: string }) => {
55 const response = await fetch(
56 getFeedUrl(query),
57 );

githubGistsmain.tsx2 matches

@scott•Updated 8 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub gists
4export let githubGists = fetchJSON(
5 "https://api.github.com/users/stevekrouse/gists",
6);

razzamain.tsx2 matches

@gio•Updated 8 months ago
119 function updateExistingCodes() {
120 const category = document.getElementById('filterCategory').value;
121 fetch('/existing-qr-codes?category=' + encodeURIComponent(category))
122 .then(response => response.json())
123 .then(codes => {
205 }
206
207 fetch('/generate', {
208 method: 'POST',
209 headers: {

nasaImageDetailsmain.tsx2 matches

@kcorey•Updated 8 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export const nasaImageDetails = async () => {
4 const nasaAPOD = await fetchJSON("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY");
5 let nasaImageHtml = nasaAPOD.hdurl
6 ? `<img width="100%" src="${nasaAPOD.hdurl}"/>`

promptGenmain.tsx1 match

@all•Updated 8 months ago
29 setLoading(true);
30 try {
31 const response = await fetch("/generate", {
32 method: "POST",
33 headers: { "Content-Type": "application/json" },

multirouteHonomain.tsx1 match

@cofsana•Updated 8 months ago
108});
109
110export default app.fetch;
111
112const css = `

postmanClonemain.tsx3 matches

@maxm•Updated 8 months ago
1/**
2 * This val creates a Postman-like interface for testing HTTP requests directly in the browser.
3 * It uses React for the UI and the Fetch API to make requests.
4 * The server function serves the HTML and handles the API requests.
5 */
24 body: method !== 'GET' && body ? body : undefined
25 };
26 const res = await fetch('/proxy', {
27 method: 'POST',
28 headers: { 'Content-Type': 'application/json' },
108 const { url: targetUrl, options } = await request.json();
109 try {
110 const response = await fetch(targetUrl, options);
111 const data = await response.json();
112 return new Response(JSON.stringify({

niceTodoListmain.tsx1 match

@maxm•Updated 8 months ago
43 }
44
45 // Fetch todos from the database
46 const todos = await sqlite.execute(`SELECT * FROM ${KEY}_todos_${SCHEMA_VERSION} ORDER BY id DESC`);
47

multiplayerCirclesmain.tsx2 matches

@lisardo•Updated 8 months ago
86 const y = d3.select(this).attr("cy");
87
88 fetch(`/update?x=${x}&y=${y}&i=${d3.select(this).attr("idx")}`, { method: "post" });
89 d3.select(this).attr("stroke", null);
90 }
190 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
191});
192export default app.fetch;

proxyFetch2 file matches

@vidar•Updated 22 hours ago

TAC_FetchBasic2 file matches

@A7_OMC•Updated 1 day ago