You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%7D?q=fetch&page=6&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 14486 results for "fetch"(4529ms)
11forwardedHeaders.delete("host");
1213const res = await fetch(targetUrl, {
14method: req.method,
15headers: forwardedHeaders,
362
363try {
364// Fetch the source code
365const response = await fetch(sourceUrl);
366if (!response.ok) {
367return c.text(`Failed to fetch source: ${response.status}`, 404);
368}
369
611async function detectBlock(code, line, column) {
612if (blockDetectorUrl) {
613const response = await fetch(blockDetectorUrl, {
614method: 'POST',
615headers: { 'Content-Type': 'application/json' },
624async function explainBlock(code, blockInfo) {
625if (blockExplainerUrl) {
626const response = await fetch(blockExplainerUrl, {
627method: 'POST',
628headers: { 'Content-Type': 'application/json' },
770}
771772export default app.fetch;