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=690&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 8446 results for "fetch"(958ms)

OpenAImain.tsx1 match

@pomdtr•Updated 1 year ago
12 * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
13 * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
14 * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
15 * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
16 * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.

exchangeRatemain.tsx2 matches

@frontsideair•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export async function exchangeRate() {
5 const cheerio = await import("npm:cheerio");
6 const page = await fetch(
7 "https://kur.doviz.com/serbest-piyasa/amerikan-dolari",
8 ).then((response) => response.text());

isMyWebsiteDownmain.tsx2 matches

@icy•Updated 1 year ago
10 let status: number;
11 try {
12 const res = await fetch(URL, { redirect: "follow" });
13 if (res.status !== 200) {
14 reason = `(status code: ${res.status})`;
17 }
18 } catch (e) {
19 reason = `couldn't fetch: ${e}`;
20 ok = false;
21 }

email_docsmain.tsx1 match

@appan•Updated 1 year ago
61 attachments?: AttachmentData[];
62}) => {
63 let result = await fetch(
64 `${API_URL}/v1/email`,
65 {

readabilityHTTPProxymain.tsx2 matches

@nbbaier•Updated 1 year ago
1import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
3import { html } from "https://esm.town/v/stevekrouse/html?v=5";
4import { Readability } from "npm:@mozilla/readability";
89 }
90
91 let body = await fetchText(articleUrl);
92
93 let doc = new JSDOM(body);

fetchTextREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: a0_forks/fetchText

fetchJSONREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: a0_forks/fetchJSON

sslCertificatesmain.tsx1 match

@agmm•Updated 1 year ago
14export async function getCertificates(domain: string) {
15 const url = `https://crt.sh/json?q=${domain}`;
16 const response = await fetch(url);
17 const certificates: Certificate[] = await response.json();
18 const domains = [...new Set(certificates.map(el => el.common_name))];

fetch_exampleREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: a2_shared/fetch_example

fetchREADME.md2 matches

@vladimyr•Updated 1 year ago
1# Proxied fetch - https://docs.val.town/std/fetch
2
3Migrated from folder: a0_forks/fetch

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago