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=400&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 7881 results for "fetch"(1423ms)

cerebras_codermain.tsx1 match

@pashis•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cerebras_codermain.tsx1 match

@chaitanya5•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cerebras_codermain.tsx1 match

@paxien•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cerebras_codermain.tsx1 match

@beybladeog•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

sendGridEmailsmain.tsx1 match

@ianmenethil•Updated 4 months ago
68 headers?: Record<string, string>;
69}) => {
70 let result = await fetch(
71 `${API_URL}/v1/email`,
72 {

cerebras_codermain.tsx1 match

@saravananarch•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

sharedTextBoxmain.tsx7 matches

@wolf•Updated 4 months ago
12 const isTyping = useRef(false);
13
14 const fetchContent = useCallback(async () => {
15 if (!key) return;
16 const response = await fetch(`/content?key=${encodeURIComponent(key)}`);
17 if (response.ok) {
18 const data = await response.json();
27 useEffect(() => {
28 if (key) {
29 fetchContent();
30 const interval = setInterval(fetchContent, 2000);
31 return () => clearInterval(interval);
32 }
33 }, [key, fetchContent]);
34
35 const debouncedSave = useDebouncedCallback(async (newContent) => {
36 if (!key) return;
37 const response = await fetch("/content", {
38 method: "POST",
39 headers: { "Content-Type": "application/json" },
47 } else {
48 // Handle conflict
49 fetchContent();
50 }
51 isTyping.current = false;

OpenAImain.tsx1 match

@ianmenethil•Updated 4 months 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.

cerebras_codermain.tsx1 match

@code01•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

tldc_discordmain.tsx1 match

@hyusap•Updated 4 months ago
89
90 // ping a discord webhook with this data
91 await fetch(
92 "https://discord.com/api/webhooks/1323134375180763239/xuXUnXLpjMW6-oaWxE8i4h52HSgLf8ikvpj9_L95ujxXsWPQTXdhpGyaQuev7dGUebwt",
93 {

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago