You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%7D?q=fetch&page=18&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"(2193ms)
166const { content: url } = await c.req.json() as ParseRequest;
167168// Fetch the webpage content
169const response = await fetch(url);
170if (!response.ok) {
171return c.json({ success: false, error: "Failed to fetch URL" } as ParseResponse);
172}
173
221222// Inject data to avoid extra round-trips
223const initialData = await fetchInitialData();
224const dataScript = `<script>
225window.__INITIAL_DATA__ = ${JSON.stringify(initialData)};
2682695. **API Design:**
270- `fetch` handler is the entry point for HTTP vals
271- Run the Hono app with `export default app.fetch // This is the entry point for HTTP vals`
2722736. **Hono Peculiarities:**