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=1073&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 13595 results for "fetch"(3939ms)

arenaApiExampleREADME.md1 match

@deblina•Updated 8 months ago
3Example of using the [are.na](https://dev.are.na/documentation/channels#Block43472) API to get the contents of an Are.na board - specifically my fun board that showcases websites with that "glossy black style."
4
5All you need is [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to make this happen!

bbrunmain.tsx1 match

@kenbarrett•Updated 8 months ago
115 const body = await req.json() as { $key: string };
116 body.$key = $key;
117 const response = await fetch(endpointURL, {
118 method: "POST",
119 headers: {

bbaasfemain.tsx2 matches

@nlnhsr•Updated 8 months ago
142 }
143 }
144 const response = await fetch(createEndpointUrl("invoke"), {
145 method: "POST",
146 body: JSON.stringify(body),
152};
153
154const data = await (await fetch(createEndpointUrl("describe"), { method: "POST" }))
155 .json() as NodeDescriberResult;
156

openaiproxymain.tsx2 matches

@roadlabs•Updated 8 months ago
28 const authHeader = req.headers.get("Proxy-Authorization") || req.headers.get("Authorization");
29 const token = authHeader ? parseBearerString(authHeader) : undefined;
30 const meRes = await fetch(`${API_URL}/v1/me`, { headers: { Authorization: `Bearer ${token}` } });
31 if (!meRes.ok) {
32 return new Response("Unauthorized", { status: 401 });
63 });
64
65 const openAIRes = await fetch(url, {
66 method: req.method,
67 headers,

bbaasfemain.tsx2 matches

@odicho•Updated 8 months ago
210 }
211 }
212 const response = await fetch(createEndpointUrl("invoke"), {
213 method: "POST",
214 body: JSON.stringify(body),
220};
221
222const data = await (await fetch(createEndpointUrl("describe"), { method: "POST" }))
223 .json() as NodeDescriberResult;
224

bbrunmain.tsx1 match

@yejun•Updated 8 months ago
115 const body = await req.json() as { $key: string };
116 body.$key = $key;
117 const response = await fetch(endpointURL, {
118 method: "POST",
119 headers: {

cooingTomatoSquirrelmain.tsx2 matches

@mrsnor•Updated 8 months ago
94 tokenUrl.searchParams.set("state", store.state);
95
96 const tokenResp = await fetch(tokenUrl.toString());
97 if (!tokenResp.ok) {
98 throw new Error(await tokenResp.text());
103 };
104
105 const resp = await fetch("https://lastlogin.io/userinfo", {
106 headers: {
107 Authorization: `Bearer ${access_token}`,

bbruncmain.tsx1 match

@dglazkov•Updated 8 months ago
123 const body = await req.json() as { $key: string };
124 body.$key = $key;
125 const response = await fetch(endpointURL, {
126 method: "POST",
127 headers: {

madpropsv2main.tsx3 matches

@elibcohen•Updated 8 months ago
62 // Load props data from API
63 async function loadProps() {
64 const statePropsData = await fetch("/api/state-props").then(res => res.json());
65 setStateProps(statePropsData);
66 }
72 // Load user choices from server
73 async function loadUserChoices() {
74 const choices = await fetch(`/api/user-choices?id=${userID}`).then(res => res.json());
75 setUserChoices(choices);
76 }
84 // Save user choices to server
85 if (userID) {
86 fetch(`/api/user-choices?id=${userID}`, {
87 method: "POST",
88 headers: {

redditSearchmain.tsx1 match

@jasperfurniss•Updated 8 months ago
20 try {
21 const url = constructSearchUrl(query);
22 const response = await fetch(url);
23 if (!response.ok) {
24 throw new Error(`HTTP error! status: ${response.status}`);

FetchBasic2 file matches

@ther•Updated 11 hours ago

GithubPRFetcher

@andybak•Updated 3 days ago