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%22Optional%20title%22?q=fetch&page=762&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 8590 results for "fetch"(1936ms)

replitListmain.tsx2 matches

@claytn•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let replitList = (REPLIT_DB_URL, prefix) =>
4 fetch(`${REPLIT_DB_URL}?prefix=${encodeURIComponent(prefix)}`);

replitSetmain.tsx2 matches

@claytn•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let replitSet = (REPLIT_DB_URL, key, value) =>
4 fetch(`${REPLIT_DB_URL}/${key}=${encodeURIComponent(value)}`, {
5 method: "POST",
6 headers: { "Content-Type": "application/x-www-form-urlencoded" },

curveMinusServermain.tsx1 match

@ralfw•Updated 1 year ago
13 app.get("/ai-plugin.json", (c) => c.text(curveMinusManifest));
14 app.get("/openapi.yaml", (c) => c.text(curveMinusOpenAPI));
15 return app.fetch(req);
16};

fetchJSONmain.tsx2 matches

@_•Updated 1 year ago
1import { fetchJSON as fetchJSON2 } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let fetchJSON = fetchJSON2;

getYoutubeLinkFromPagemain.tsx2 matches

@wilt•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getYoutubeLinkFromPage(url: string) {
4 const resp = await fetch(url);
5 const htmlText = await resp.text();
6 const match = htmlText.match(/https:\/\/youtube.com\/[^"]+/);

discordMessagesmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function discordMessages({ botToken, channelId }) {
4 return fetchJSON(
5 `https://discord.com/api/channels/${channelId}/messages`,
6 {

hnSearchByDatemain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let hnSearchByDate = (params) => fetchJSON(
4 `http://hn.algolia.com/api/v1/search_by_date?${new URLSearchParams(params)}`
5)

fetchDateMeProfilesmain.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { dateMeURL } from "https://esm.town/v/stevekrouse/dateMeURL";
2import { fetchTable } from "https://esm.town/v/stevekrouse/fetchTable";
3
4export const fetchDateMeProfiles = () =>
5 fetchTable(
6 dateMeURL,
7 ) as Promise<{

xevalmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { eval_ } from "https://esm.town/v/stevekrouse/eval_";
2import { fetchTweet } from "https://esm.town/v/dpetrouk/fetchTweet?v=35";
3
4export let xeval = async (req: Request) => {
5 let tweet, code, result;
6 try {
7 tweet = await fetchTweet(req.url);
8 code = tweet.text.split("```")[1]
9 .trim()

valtownAPIExamplesmain.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let valtownAPIExamples = [
4 "https://api.val.town/v1/alias/stevekrouse",
5 "https://api.val.town/v1/users/a0bf3b31-15a5-4d5c-880e-4b1e22c9bc18",
6 "https://api.val.town/v1/alias/stevekrouse/fetchJSON",
7 "https://api.val.town/v1/vals/18b54b4e-779a-4c56-8ee6-4c75af7e55f0",
8].map(fetchJSON);

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago