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=1121&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 13344 results for "fetch"(1228ms)

createValVersionmain.tsx2 matches

@neverstew•Updated 11 months ago
1// my inserted comment
2 import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export function createValVersion({ token, valId, code }: {
26 referenceCount: number;
27}> {
28 return fetchJSON(
29 `https://api.val.town/v1/vals/${valId}/versions`,
30 {

pingNationsmain.tsx1 match

@bohaska•Updated 11 months ago
16 const myHeaders = new Headers(httpHeaders);
17 console.log("Starting...");
18 let response = await fetch(
19 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${nations[i]}&q=issues`,
20 {

blob_adminmain.tsx2 matches

@amotivv•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
133});
134
135export default modifyFetchHandler(passwordAuth(app.fetch));

nationstatesSentimentAImain.tsx3 matches

@bohaska•Updated 11 months ago
10
11async function query(data) {
12 const response = await fetch(
13 "https://api-inference.huggingface.co/models/cardiffnlp/twitter-roberta-base-sentiment-latest",
14 {
33 const myHeaders = new Headers(httpHeaders);
34 console.log("Starting...");
35 let response = await fetch(
36 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${Deno.env.get("NATION_ID")}&q=issues`,
37 {
70 await Promise.all(optionPromises);
71
72 let execute_issue = await fetch(
73 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${
74 Deno.env.get("NATION_ID")

test_explorermain.tsx1 match

@maxm•Updated 11 months ago
3export { Test } from "https://esm.town/v/pomdtr/test";
4
5export default router.fetch;

dubLinkMakermain.tsx2 matches

@mux•Updated 11 months ago
57 // If the destination is `list`, return a list of all the existing short links
58 if (destination === "list") {
59 const req = await fetch(`https://api.dub.co/links?workspaceId=${dubWorkspaceId}`, {
60 headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
61 });
84
85 try {
86 const resp = await fetch(`https://api.dub.co/links?workspaceId=${dubWorkspaceId}`, options).then(
87 response => response.json(),
88 );

steampipeQuerymain.tsx1 match

@pomdtr•Updated 11 months ago
1const query = "select title, url from hackernews_top limit 10;";
2
3const resp = await fetch(`https://steampipe.pomdtr.me/query/${encodeURIComponent(query)}?output=json`, {
4 headers: {
5 Authorization: "Bearer " + Deno.env.get("SMALLWEB_TOKEN"),

query_aian_lar_map_servermain.tsx1 match

@parkerziegler•Updated 11 months ago
3 `https://biamaps.geoplatform.gov/server/rest/services/DivLTR/BIA_AIAN_National_LAR/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&timeRelation=esriTimeRelationOverlaps&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&sqlFormat=none&datumTransformation=&parameterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=geojson`;
4
5fetch(endpoint)
6 .then((res) => res.json())
7 .then((data) => {

TextTransformermain.tsx2 matches

@chet•Updated 11 months ago
37
38 try {
39 const response = await fetch('${url}', {
40 method: 'POST',
41 headers: {
52 textarea.value = data;
53 } catch (error) {
54 console.error('Error during fetch:', error);
55 alert('There was an error processing your request.');
56 }

HtmlFormattermain.tsx2 matches

@chet•Updated 11 months ago
39
40 try {
41 const response = await fetch('${url}', {
42 method: 'POST',
43 headers: {
54 textarea.value = data;
55 } catch (error) {
56 console.error('Error during fetch:', error);
57 alert('There was an error processing your request.');
58 }

GithubPRFetcher

@andybak•Updated 1 day ago

proxiedfetch1 file match

@jayden•Updated 2 days ago