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/image-url.jpg%20%22Image%20title%22?q=fetch&page=967&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 13959 results for "fetch"(2523ms)

mariaSilviaTrigomain.tsx3 matches

@joseforonda•Updated 4 months ago
1import { dataToRSS } from "https://esm.town/v/stevekrouse/dataToRSS";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4function parseElement(el: any) {
18 feedSlugAuthor: "maria-silvia-trigo",
19 };
20 const url = `https://www.infobae.com/pf/api/v3/content/fetch/content-feed?query=${
21 encodeURIComponent(JSON.stringify(params))
22 }`;
23 const res = await fetchJSON(url);
24 const data = res.content_elements.map(parseElement);
25 return new Response(

patientCyanBearmain.tsx1 match

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

usableCoralMarmosetmain.tsx1 match

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

cordialGoldGerbilmain.tsx1 match

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

cerebrasTemplatemain.tsx1 match

@h123•Updated 4 months ago
20
21 try {
22 const response = await fetch("/chat", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },

cerebras_codermain.tsx1 match

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

honoExamplemain.tsx1 match

@matteogauthier•Updated 4 months ago
4app.get('/', c => c.text("Hello Hono!"))
5
6export const honoExample = app.fetch

wordcountermain.tsx1 match

@charmaine•Updated 4 months ago
169app.get("/", (c) => c.html(html));
170
171export default (typeof Deno !== "undefined" && Deno.env.get("valtown")) ? app.fetch : app;

karate_classesmain.tsx18 matches

@stevekrouse•Updated 4 months ago
97
98 useEffect(() => {
99 fetch("/api/classes")
100 .then(res => res.json())
101 .then(data => {
102 console.log("Fetched classes:", data);
103 setClasses(data);
104 })
105 .catch(error => console.error("Error fetching classes:", error));
106 }, []);
107
132
133 useEffect(() => {
134 console.log("Fetching class details for ID:", id);
135 fetch(`/api/classes/${id}`)
136 .then(res => res.json())
137 .then(data => {
138 console.log("Fetched class details:", data);
139 setClassInfo(data);
140 })
141 .catch(error => console.error("Error fetching class details:", error));
142
143 if (email) {
144 console.log("Checking registration status for email:", email);
145 fetch(`/api/classes/${id}/registration?email=${email}`)
146 .then(res => res.json())
147 .then(data => {
148 console.log("Fetched registration status:", data);
149 setIsRegistered(data.registered);
150 })
151 .catch(error => console.error("Error fetching registration status:", error));
152 }
153 }, [id, email]);
156
157 const handleRegister = () => {
158 fetch(`/api/classes/${id}/register`, {
159 method: "POST",
160 headers: { "Content-Type": "application/json" },
174
175 const handleCancel = () => {
176 fetch(`/api/classes/${id}/cancel`, {
177 method: "POST",
178 headers: { "Content-Type": "application/json" },
193 const handleDelete = () => {
194 if (window.confirm("Are you sure you want to delete this class?")) {
195 fetch(`/api/classes/${id}`, { method: "DELETE" })
196 .then(() => navigate("/classes"))
197 .catch(error => console.error("Error deleting class:", error));
266 useEffect(() => {
267 if (id) {
268 fetch(`/api/classes/${id}`)
269 .then(res => res.json())
270 .then(data => {
275 });
276 })
277 .catch(error => console.error("Error fetching class data:", error));
278 }
279 }, [id]);
291 const url = id ? `/api/classes/${id}` : "/api/classes";
292
293 fetch(url, {
294 method,
295 headers: { "Content-Type": "application/json" },
415 const emailList = emails.split(/[\s,]+/).filter(email => email.trim() !== "");
416
417 fetch(`/api/classes/${id}/bulk-add`, {
418 method: "POST",
419 headers: { "Content-Type": "application/json" },
738
739 if (url.pathname.startsWith("/api")) {
740 return app.fetch(request);
741 }
742

wordcountermain.tsx1 match

@all•Updated 4 months ago
169app.get("/", (c) => c.html(html));
170
171export default (typeof Deno !== "undefined" && Deno.env.get("valtown")) ? app.fetch : app;

FetchBasic2 file matches

@ther•Updated 5 days ago

GithubPRFetcher

@andybak•Updated 1 week ago