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/$1?q=fetch&page=1111&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 13191 results for "fetch"(5618ms)

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 (_) {

add_to_habitify_from_todoist_w_aimain.tsx6 matches

@nerdymomocat•Updated 11 months ago
110 return comments;
111 } catch (error) {
112 console.error(`Error fetching comments for task ${taskId}:`, error);
113 return [];
114 }
135async function downloadImage(url) {
136 try {
137 const response = await fetch(url, {
138 headers: {
139 Authorization: `Bearer ${TODOIST_API_KEY}`,
322
323 try {
324 const response = await fetch(url, {
325 method: "POST",
326 headers: headers,
349
350 try {
351 const response = await fetch(url, {
352 method: "POST",
353 headers: headers,
373
374 try {
375 const response = await fetch(url, {
376 method: "POST",
377 headers: headers,
403
404 try {
405 const response = await fetch(url, { method: "GET", headers: headers });
406 if (!response.ok) {
407 throw new Error(`HTTP error! status: ${response.status}`);

proxiedfetch1 file match

@jayden•Updated 17 hours ago

fetch-socials4 file matches

@welson•Updated 4 days ago
fetch and archive my social posts