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=758&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 8318 results for "fetch"(2425ms)

githubStarredmain.tsx2 matches

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

starWarsmain.tsx2 matches

@kallev•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Explore the Star Wars universe, from StarWarsAPI
4export let starWars = fetchJSON(
5 "https://swapi.dev/api/people/1/"
6);

isUpmain.tsx2 matches

@brenton•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL?v=3";
3
7 options?: any
8) => {
9 let f = await fetch(normalizeURL(url), {
10 redirect: "follow",
11 ...(options || {}),

bookReservationOnResymain.tsx7 matches

@alp•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const bookReservationOnResy = async ({
143 params.email
144 )}&password=${encodeURIComponent(params.password)}`;
145 const response = await fetch(`${RESY_API_URL}/3/auth/password`, {
146 method: "POST",
147 body: body,
165 }) => {
166 const url = `${RESY_API_URL}/3/details`;
167 const response = await fetch(url.toString(), {
168 method: "POST",
169 headers: RESY_DEFAULT_HEADERS,
190 searchParams.set("party_size", params.seats.toString());
191 searchParams.set("venue_id", params.venueId);
192 const response = await fetch(`${url}?${searchParams}`, {
193 method: "GET",
194 headers: RESY_DEFAULT_HEADERS,
210 searchParams.set("url_slug", params.slug);
211 searchParams.set("location", params.city);
212 const response = await fetch(`${url}?${searchParams}`, {
213 method: "GET",
214 headers: RESY_DEFAULT_HEADERS,
222 authToken: string;
223 }) => {
224 const response = await fetch(`${RESY_API_URL}/3/book`, {
225 method: "POST",
226 headers: {
247 venueId,
248 });
249 console.log("Fetched available slots for day", {
250 count: slots.length,
251 times: slots.map((slot) => `${slot.date.start} -> ${slot.date.end}`),

ipmain.tsx2 matches

@hanu•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/hanu/fetchJSON";
2
3export let ip = await fetchJSON("https://api.ipify.org?format=json");

geolocationmain.tsx1 match

@juliendorra•Updated 1 year ago
1export let geolocation = async (req, res) => {
2 const ip = req.options.headers["x-forwarded-for"];
3 const jsonresponse = await $stevekrouse.fetchJSON(
4 `http://ip-api.com/json/${ip}`
5 );

getCNNNewsmain.tsx2 matches

@fab1an•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getCNNNews() {
4 const response = await fetch(
5 "https://saurav.tech/NewsAPI/everything/cnn.json"
6 );

holidaysUSmain.tsx2 matches

@dosirak•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/v3/PublicHolidays/2023/KR"
6);

fetchJavascriptWeeklyIssuesmain.tsx2 matches

@Timmy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const fetchJavascriptWeeklyIssues = fetch("https://javascriptweekly.com/issues")
4 .then((res) => {
5 const domText = res.text();

getTelAvivMobilitySpotsmain.tsx2 matches

@rustyb•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface APIResponse {
10 // "https://gisn.tel-aviv.gov.il/arcgis/rest/services/IView2/MapServer/860/query?where=1=1&outFields=*&f=geojson";
11 const url = "https://app.digital4grids.com/api";
12 const json_data = await fetchJSON(url);
13 return { "json_data": [] };
14}

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago