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/$%7Bsuccess?q=fetch&page=769&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 8212 results for "fetch"(2182ms)

webhookmain.tsx2 matches

@eric•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { secretSlackWebhookEndpoint } from "https://esm.town/v/eric/secretSlackWebhookEndpoint";
3
5 const slack = secretSlackWebhookEndpoint
6 console.log("@eric.webhook", req.body)
7 await fetch(slack, {
8 method: 'POST',
9 header: {'Content-Type': 'application/json'},

markdownToHtmlmain.tsx2 matches

@jessmartin•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const markdownToHtml = async (res, req) => {
5 const unified = (await import("npm:unified")).unified;
6 const markdown = (await import("npm:remark-parse")).default;
7 const markdownToConvert = fetch(
8 "https://jessmartin-todoMarkdown.express.val.run",
9 );

register_discord_commandsmain.tsx2 matches

@malloc•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let register_discord_commands = async (
13 url += `commands`;
14 }
15 const response = await fetch(url, {
16 headers: {
17 "Content-Type": "application/json",

reachingFreeTierLimitmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { paginateAPI } from "https://esm.town/v/andreterron/paginateAPI";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3import process from "node:process";
4
14 },
15 };
16 const me = await fetchJSON(
17 "https://api.val.town/v1/me",
18 opts,

createGeneratedValmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2import { runVal } from "https://esm.town/v/std/runVal";
3
10 description,
11 );
12 const val = await fetchJSON(
13 `https://api.val.town/v1/vals`,
14 {

postWebhookTest4main.tsx2 matches

@val•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/val/fetchJSON";
2
3export let postWebhookTest4 = fetchJSON(
4 "https://api.val.town/express/@val.postWebhook5",
5 {

holidaysUSmain.tsx2 matches

@rcoady•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);

githubGistsmain.tsx2 matches

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

getCoolPostsmain.tsx2 matches

@VictorForissier•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function getCoolPosts() {
4 return fetch("https://hn.algolia.com/api/v1/search_by_date?tags=author_pg")
5 .then((res) => res.json())
6 .then((res) => res.hits[0].comment_text);

variablePowermain.tsx2 matches

@jedahan•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const variablePower = (request, response) => {
25`;
26
27 fetchJSON("https://api.magicthegathering.io/v1/cards?power=*")
28 .then(({ cards }) => {
29 const names = new Set();

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago