Comment

Comment by franciscop

If someone in Netlify is listening, could you please add support for Fetchable[1] in Netlify Edge Functions? I opened a ticket 1 week ago but it has gone unanswered[2].

The idea behind Fetchable is to have a (semi) standard across runtimes and environments to be able to do this:

    export default {
      async fetch(req: Request): Promise<Response> {
        return new Response(`Hello, ${req.headers.get("User-Agent")}!`)
      }
    }
Even Node.js, who are traditionally the laggards in these things, are already working on it and implementing it. This would be very useful for library writers like me to be able to standardize code across envrionments. I'm re-writing npm's `server` (currently WIP here [3]) and I have some ugly workarounds ONLY for Netlify Edge Functions.

[1] https://fetchable.org/ [2] https://answers.netlify.com/t/support-fetch-for-netlify-edge... [3] https://server-js.com/

parent franciscop 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton