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/$%7Bsuccess?q=fetch&page=627&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 9274 results for "fetch"(1325ms)

practicalBeigeCapybaramain.tsx2 matches

@stevekrouse•Updated 6 months ago
139 });
140
141 self.addEventListener('fetch', event => {
142 event.respondWith(
143 caches.match(event.request)
144 .then(response => response || fetch(event.request))
145 );
146 });

helloWorldmain.tsx1 match

@campsite•Updated 6 months ago
17 };
18
19 const response = await fetch("https://api.campsite.com/v2/posts", {
20 method: "POST",
21 headers: {

axiomNotifiermain.tsx1 match

@campsite•Updated 6 months ago
39 const message = `**${status}: ${payload.event.title}**\n${payload.event.body}`;
40
41 const campsiteResponse = await fetch(
42 `https://api.campsite.com/v2/threads/${CAMPSITE_ALERTS_THREAD_ID}/messages`,
43 {

blob_adminmain.tsx2 matches

@tangent•Updated 6 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));

ssr_react_minimain.tsx1 match

@mrt•Updated 6 months ago
22 const onData = onSubmit ? onSubmit(e) : () => 1;
23 const formData = new FormData(e.target as any);
24 const resp = await fetch("/", {
25 method: props.action ?? "POST",
26 body: formData,

apimain.tsx4 matches

@campsite•Updated 6 months ago
114 }
115
116 private async fetch<T>(
117 endpoint: string,
118 method: "GET" | "POST" | "PUT" | "DELETE" = "GET",
138 };
139
140 const response = await fetch(url, {
141 method,
142 headers,
154
155 private async get<T>(endpoint: string, params?: Params) {
156 return this.fetch<T>(endpoint, "GET", undefined, params);
157 }
158
159 private async post<T>(endpoint: string, body: object) {
160 return this.fetch<T>(endpoint, "POST", body);
161 }
162

FetchBasicmain.tsx3 matches

@julesb22•Updated 6 months ago
13
14 try {
15 // Make the API request to fetch subscriber details
16 const response = await fetch(apiUrl, {
17 method: "GET",
18 headers: {
24 // Check if the response is successful
25 if (!response.ok) {
26 throw new Error(`Error fetching subscriber data: ${response.statusText}`);
27 }
28

FetchBasicREADME.md2 matches

@julesb22•Updated 6 months ago
1# Framer Fetch: Basic
2
3A basic example of an API endpoint to use with Framer Fetch.

FetchBasic_deleted_1729503955README.md2 matches

@julesb22•Updated 6 months ago
1# Framer Fetch: Basic
2
3A basic example of an API endpoint to use with Framer Fetch.

simpletypemain.tsx5 matches

@dantaloupe•Updated 7 months ago
24 });
25
26 const fetchWords = useCallback(async () => {
27 try {
28 const response = await fetch("https://random-word-api.herokuapp.com/all");
29 if (!response.ok) {
30 throw new Error("Failed to fetch words");
31 }
32 const data = await response.json();
38
39 useEffect(() => {
40 fetchWords();
41 }, [fetchWords]);
42
43 const generateChallenge = useCallback(() => {

proxyFetch2 file matches

@vidar•Updated 1 day ago

TAC_FetchBasic2 file matches

@A7_OMC•Updated 2 days ago