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/$%7Bart_info.art.src%7D?q=fetch&page=1032&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 13403 results for "fetch"(1658ms)

elegantJadeParrotfishmain.tsx4 matches

@temptemp•Updated 7 months ago
12
13async function archive(url: string) {
14 const response = await fetch(url);
15 const body = await response.text();
16 const $ = load(body);
51 <h3>DDL UTILITY v0.0.1b</h3>
52 <code>
53 This site fetches content from another site,if any links dosent work then the movie is probably not uploaded.
54 </code>
55 <input type="text" placeholder="IMDB ID" name="imdb" />
67 const url = new URL(atob(c.req.query("id")));
68 if ((url.hostname) !== "www.primewire.tf") throw new Error("Error...");
69 const req = await fetch(url, { method: "HEAD", redirect: "manual" });
70 const realURL = await req.headers.get("location");
71 const newURL = new URL(realURL);
344// getSourcesParams.append("h", kid);
345// getSourcesParams.append("b", browserid);
346// const result = await fetch(
347// `https://rabbitstream.net/ajax/v2/embed-4/getSources?${getSourcesParams.toString()}`,
348// {

verbalScarletAntelopemain.tsx12 matches

@vawogbemi•Updated 7 months ago
60 }, [state.loading, state.hasMore]);
61
62 const fetchStories = async () => {
63 try {
64 const response = await fetch("/api/stories");
65 if (!response.ok) throw new Error("Failed to fetch dates");
66 const data = await response.json();
67 setStories(data);
69 }
70 catch (err) {
71 console.error("Error fetching stories:", err);
72 }
73 };
74
75 const fetchComments = async (query: string, story: string, page: number) => {
76 try {
77 dispatch({ type: "loading", value: true });
78 const response = await fetch(`/api/comments?query=${encodeURIComponent(query)}&story=${story}&page=${page}`);
79 if (!response.ok) throw new Error("Failed to fetch comments");
80 const data = await response.json();
81 setComments(prevComments => page === 1 ? data.hits : [...prevComments, ...data.hits]);
84 dispatch({ type: "loading", value: false });
85 } catch (err) {
86 console.error("Error fetching comments:", err);
87 dispatch({ type: "loading", value: false });
88 }
99 dispatch({ type: "hasMore", value: true });
100 dispatch({ type: "query", value: newQuery });
101 fetchComments(fullQuery, state.story, 1);
102 };
103
104 useEffect(() => {
105 fetchStories();
106
107 const handleScroll = () => {
122 : "";
123 const fullQuery = `${filtersQuery} ${state.query}`;
124 fetchComments(fullQuery, state.story, state.page);
125 }
126 }
408 tags: `comment, story_${story}`,
409 page: 0,
410 hitsPerPage: 100, // Fetch a moderate number of comments
411 });
412

forbearingOrangePlatypusmain.tsx2 matches

@Felistan•Updated 7 months ago
35
36async function execute(statement: InStatement, args?: InArgs): Promise<ResultSet> {
37 const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38 method: "POST",
39 headers: {
50
51async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
52 const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
53 method: "POST",
54 headers: {

sqlitemain.tsx2 matches

@Felistan•Updated 7 months ago
35
36async function execute(statement: InStatement, args?: InArgs): Promise<ResultSet> {
37 const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38 method: "POST",
39 headers: {
50
51async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
52 const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
53 method: "POST",
54 headers: {

FedifyOnValTownmain.tsx1 match

@minhee•Updated 7 months ago
168 );
169 }
170 return federation.fetch(req, { contextData: undefined });
171}

jubilantMagentaMitemain.tsx3 matches

@youchen•Updated 7 months ago
30
31 modifiedRequest.headers.set("Referer", `${EMBY_SERVER}/web/index.html`);
32 return fetch(modifiedRequest);
33 }
34 }
47 modifiedRequest.headers.set("Connection", request.headers.get("Connection") || "close");
48
49 return fetch(modifiedRequest);
50}
51
52addEventListener("fetch", event => {
53 event.respondWith(handleRequest(event.request));
54});

fetchXMLREADME.md1 match

@g000m•Updated 7 months ago
1Migrated from folder: utils/fetchXML

sendxmppmain.tsx1 match

@singpolyma•Updated 7 months ago
1export default async function sendxmpp(target: string, body: string) {
2 await fetch("https://singpolyma-sendxmppapi.web.val.run", {
3 method: "POST",
4 body: JSON.stringify({ target, body })

blob_adminmain.tsx2 matches

@car•Updated 7 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));

handlermain.tsx1 match

@temptemp•Updated 7 months ago
60}
61async function getMeta(imdbId: string): Promise<Meta> {
62 const searchResult = await fetch(`${primewireBase}/api/v1/show?key=${primewireApiKey}&imdb_id=${imdbId}`);
63 return await searchResult.json() as Meta;
64}

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 2 days ago