Robert Nagy
Robert Nagy
Once you are done with that I have some ideas I'd like to experiment to further simplify and improve the dispatch api.
@metcoder95 another step we should do is to change the handlers (i.e. retry, redirect etc...) to export functions instead of classes, i.e. ```js export const redirect = (dispatch) => ({...
I don't have a clear timeline atm. I don't think these changes should be noticable inside node.
What is the error? msg? stack?
Doesn't the alternative you propose already work?
What about just introducing a new api? To avoid confusion and overlap, i.e.: ```js await http.serve(async req => { req.respondWith(fetch('https://httpbin.org/get')) }, { port }) ``` https://deno.land/[email protected]/examples/http_server#using-the-stdhttp-library
I think the biggest challenge is implementing `req`.
Actually my previous example was wrong. Should be: ```js await http.serve(async req => { return fetch('https://httpbin.org/get') }, { port }) ``
@jimmywarting where does the `responseWith` come from?
Maybe this should be moved to wintercg?