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/$%7Burl%7D?q=fetch&page=692&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 8997 results for "fetch"(3787ms)

fetchTodaysNytCxPuzzlemain.tsx2 matches

@plr•Updated 11 months ago
46 search.set("filter[sizeFilter][Standard]", `${standard}`);
47 url.search = search.toString();
48 return fetch(url.toString()).then(r => r.json()) as Promise<PuzzlesData>;
49};
50
51export const fetchTodaysNytCxPuzzle = async (): Promise<Puzzle> => {
52 const dateStr = new Intl.DateTimeFormat("en-US", { year: "numeric", month: "long", day: "numeric" }).format(
53 new Date(),

exampleTranslationmain.tsx1 match

@iamseeley•Updated 11 months ago
21 const text = formData.get('text');
22
23 const response = await fetch(window.location.href, {
24 method: 'POST',
25 body: formData

exampleFeatureExtractionmain.tsx1 match

@iamseeley•Updated 11 months ago
21 const source_sentence = document.getElementById('source_sentence').value;
22 const sentences = document.getElementById('sentences').value.split(',').map(sentence => sentence.trim());
23 const response = await fetch('/extract-features', {
24 method: 'POST',
25 headers: { 'Content-Type': 'application/json' },

exampleQuestionAnsweringmain.tsx1 match

@iamseeley•Updated 11 months ago
21 const question = document.getElementById('question').value;
22 const context = document.getElementById('context').value;
23 const response = await fetch('/qa', {
24 method: 'POST',
25 headers: { 'Content-Type': 'application/json' },

exampleSummarizationmain.tsx1 match

@iamseeley•Updated 11 months ago
18 event.preventDefault();
19 const text = document.getElementById('text').value;
20 const response = await fetch('/summarize', {
21 method: 'POST',
22 headers: { 'Content-Type': 'application/json' },

exampleTextGenerationmain.tsx1 match

@iamseeley•Updated 11 months ago
18 event.preventDefault();
19 const text = document.getElementById('text').value;
20 const response = await fetch('/generate', {
21 method: 'POST',
22 headers: { 'Content-Type': 'application/json' },

exampleTextClassificationmain.tsx1 match

@iamseeley•Updated 11 months ago
18 event.preventDefault();
19 const text = document.getElementById('text').value;
20 const response = await fetch('/classify', {
21 method: 'POST',
22 headers: { 'Content-Type': 'application/json' },

pipelinemain.tsx1 match

@iamseeley•Updated 11 months ago
93 async callHuggingFaceAPI(payload, options) {
94 try {
95 const response = await fetch(`${HUGGING_FACE_API_URL}/${this.model}`, {
96 method: "POST",
97 headers: {

spinnermain.tsx1 match

@iamseeley•Updated 11 months ago
50});
51
52export default app.fetch;
53

verifyTokenmain.tsx4 matches

@pomdtr•Updated 11 months ago
1async function fetchUser(token: string): Promise<{ id: string }> {
2 const resp = await fetch("https://api.val.town/v1/me", {
3 headers: {
4 Authorization: `Bearer ${token}`,
7
8 if (resp.status !== 200) {
9 throw new Error("Could not fetch user");
10 }
11
15export async function verifyToken(token: string) {
16 try {
17 const [currentUser, requestUser] = await Promise.all([fetchUser(Deno.env.get("valtown")), fetchUser(token)]);
18 return currentUser.id == requestUser.id;
19 } catch (_) {

TAC_FetchBasic2 file matches

@A7_OMC•Updated 5 hours ago

hn-fetch1 file match

@matija•Updated 6 hours ago