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=288&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 3160 results for "fetch"(293ms)

telegramSendPhotomain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramSendPhoto = async (botToken: string, options: TelegramSendPhotoOptions) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/sendPhoto`,
6 {

passkey_scriptmain.tsx1 match

@stevekrouse•Updated 1 year ago
35
36async function postJson(url, body?) {
37 return await fetch(url, {
38 method: "POST",
39 headers: { "Content-Type": "application/json" },

passkeys_demomain.tsx1 match

@stevekrouse•Updated 1 year ago
298 return c.json("success");
299});
300export default app.fetch;

myspacemain.tsx2 matches

@stevekrouse•Updated 1 year ago
2import { Hono } from "npm:hono@3";
3
4// TODO: Fetch from key-value
5const profile = {
6 displayName: "Jordan",
169app.get("/", (c) => c.html(myspaceHtml(profile)));
170
171export default app.fetch;

frequencyDotPlotmain.tsx1 match

@stevekrouse•Updated 1 year ago
23});
24
25export default app.fetch;

yellowBonobomain.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { discordFetch } from "https://esm.town/v/vtdocs/discordFetch?v=10";
2
3const recipientId = "420257368417239041";
6const botToken = Deno.env.get("discordBot");
7
8const DM = await discordFetch(
9 botToken,
10 "/users/@me/channels",
16console.log(DM);
17// Then, we send a message via the DM
18const result = await discordFetch(
19 botToken,
20 `/channels/${DM.id}/messages`,

bookmarkmain.tsx1 match

@stevekrouse•Updated 1 year ago
78});
79
80export default app.fetch;

watchAnthropicCircuitsBlogmain.tsx2 matches

@jsomers•Updated 1 year ago
2import { blob } from "https://esm.town/v/std/blob?v=11";
3import { email } from "https://esm.town/v/std/email?v=11";
4import { fetch } from "https://esm.town/v/std/fetch";
5
6export const watchWebsite = async () => {
7 const url = "https://transformer-circuits.pub";
8 const newHtml = await fetch(url).then(r => r.text());
9
10 const key = "watch:" + url;

upload_urlmain.tsx1 match

@stevekrouse•Updated 1 year ago
4 formData.append("file", file);
5
6 const response = await fetch("https://file.io", {
7 method: "POST",
8 body: formData,

uploadTo0x0main.tsx1 match

@stevekrouse•Updated 1 year ago
4 formData.append("file", blob, name);
5 formData.append("expires", "1");
6 const response = await fetch("https://0x0.st", {
7 method: "POST",
8 body: formData,

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago