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=785&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 8302 results for "fetch"(1389ms)

githubEventsmain.tsx2 matches

@bram•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/bramses/events"
6);

getmain.tsx5 matches

@pncumhsk•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let get = () => {
4 var res = fetch("https://tampere.sometec.fi/showSpace03S.php", {
5 credentials: "include",
6 headers: {
11 "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
12 "X-Requested-With": "XMLHttpRequest",
13 "Sec-Fetch-Dest": "empty",
14 "Sec-Fetch-Mode": "cors",
15 "Sec-Fetch-Site": "same-origin",
16 },
17 referrer: "https://tampere.sometec.fi/index.html?sP409100P600P",

getAppleDevicemain.tsx2 matches

@zebrainy•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export async function getAppleDevice(req: express.Request, res: express.Response) {
4 const deviceId = req.query.search_keywords as string;
5 const html = await fetchText(
6 `https://everymac.com/ultimate-mac-lookup/?search_keywords=${
7 encodeURI(deviceId)

npmExamplemain.tsx2 matches

@phelan•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let npmExample = (async () => {
4 const ip = await import("npm:image-pixels"); // The Lodash library exported as ES modules.
5 const image = await fetch(
6 "https://upload.wikimedia.org/wikipedia/commons/c/ca/1x1.png"
7 ).then((r) => console.log(r));

aqimain.tsx2 matches

@herku•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let aqi = async () => {
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({

editValmain.tsx2 matches

@vez•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export const editVal = (body: {
7 isInterval?: boolean;
8}) =>
9 fetchJSON(`api.val.town/run/`, {
10 headers: {
11 accept: "*/*",

boredActivitiesmain.tsx2 matches

@hetzelhouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity"
6);

untitled_magentaBaboonmain.tsx1 match

@jora_cody•Updated 1 year ago
1export let untitled_magentaBaboon = async () => {
2 // const cheerio = await import("npm:cheerio");
3 // const request = await fetch("https://woolworths.com.au");
4 // const $ = cheerio.load(request.body);
5 return new Response(`<h1>Hi!</h1>`, {

runPostSaveMessagemain.tsx2 matches

@chris_symbiote•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const runPostSaveMessage = (async () => {
4 const response = await fetch(
5 "https://chris_symbiote-postSaveMessage.express.val.run",
6 {

tidbytDeviceInstallationsmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export function tidbytDeviceInstallations({ deviceId, apiKey }: {
5 apiKey: string;
6}) {
7 return fetchJSON(
8 `https://api.tidbyt.com/v0/devices/${deviceId}/installations`,
9 {

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago