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=362&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 7898 results for "fetch"(1000ms)

moralCoffeeSkinkmain.tsx1 match

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

OpenTowniesystem_prompt.txt2 matches

@pomdtr•Updated 3 months ago
155 * The main App component is rendered on the client.
156 * No server-side-specific code should be included in the App.
157 * Use fetch to communicate with the backend server portion.
158 */
159function App() {
178 * Server-only code
179 * Any code that is meant to run on the server should be included in the server function.
180 * This can include endpoints that the client side component can send fetch requests to.
181 */
182export default async function server(request: Request): Promise<Response> {

trackESMContentmain.tsx3 matches

@maxm•Updated 3 months ago
10const TABLE_NAME = `${KEY}_versions_v1`;
11
12async function fetchContent(url: string) {
13 const response = await fetch(url);
14 return await response.text();
15}
30
31 for (const url of URLS) {
32 const content = await fetchContent(url);
33 const latestVersion = await sqlite.execute(
34 `SELECT blob_key FROM ${TABLE_NAME} WHERE url = ? ORDER BY timestamp DESC LIMIT 1`,

react_client_forkmain.tsx5 matches

@johndevor•Updated 3 months ago
33 setNewTodo("");
34 // Sending new todo to server
35 await fetch('/add-todo', {
36 method: 'POST',
37 headers: {
46 setTodos(updatedTodos);
47 // Optionally, update server
48 await fetch('/delete-todo', {
49 method: 'POST',
50 headers: {
118
119function client() {
120 const fetchTodos = async () => {
121 const response = await fetch('/todos');
122 const todos = await response.json();
123 return todos;
124 };
125
126 fetchTodos().then(initialTodos => {
127 createRoot(document.getElementById("root")).render(<App initialTodos={initialTodos} />);
128 });

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx1 match

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

cerebras_codermain.tsx1 match

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

LetMeIntoLinearmain.tsx1 match

@jxxe•Updated 3 months ago
9 ];
10
11 const response = await fetch("https://cab.brown.edu/api/?page=fose&route=details", {
12 method: "POST",
13 body: JSON.stringify({

sqliteExplorerAppmain.tsx4 matches

@qkiii•Updated 3 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago