You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write dynamic handler builders, but I'm hitting this issue:
worker.use(http.get("/v1/issues",()=>HttpResponse.json(/* some json */)))// this will make the get handler ignored!worker.use(http.post("/v1/issues",()=>HttpResponse.json(/* some json */)));
I'm aware that repeated calls to worker.use prepend handlers to the existing context, and therefore order matters. But then why does this code work?
// both handlers workworker.use(http.get("/v1/issues",()=>HttpResponse.json(/* some json */)),http.post("/v1/issues",()=>HttpResponse.json(/* some json */)));
Since both handlers work when added in a single worker.use call, shouldn't this method take into account any methods previously added to the context so as not to remove them and provide the same end result?
The text was updated successfully, but these errors were encountered:
Could you please take a look at those tests and see if you can spot any difference compared to what you are doing? If the issue still persists for you, please provide a reproduction repository where I can see it. Thanks.
I'm trying to write dynamic handler builders, but I'm hitting this issue:
I'm aware that repeated calls to
worker.use
prepend handlers to the existing context, and therefore order matters. But then why does this code work?Since both handlers work when added in a single
worker.use
call, shouldn't this method take into account any methods previously added to the context so as not to remove them and provide the same end result?The text was updated successfully, but these errors were encountered: