-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
send response from middleware, continue to execute handler chain #3934
Comments
the goal here is to return a response to a slack slash command immediately, then go off and do the work the user asked for and return those responses later via an http.Client. things ive tried:
middleware chaining is preferred because it simplifies the addition of new routes, all routes will be subject to the same flow (including responding quickly, then doing some async work). |
somehow even this executes functions in the same order:
with and without a |
so this works, though isn't ideal as we step out of gin for the bulk of the processing:
curl:
log:
can anyone think of a better way? i would much rather wire up the middleware as in the written example in the issue |
Description
i cannot seem to send a response back to the requestor from within a middleware handler chain and continue to run handlers in the chain. everything i have tried will send the response after all handlers are complete
How to reproduce
Expectations
curl:
logs:
Actual result
curl:
logs:
Environment
The text was updated successfully, but these errors were encountered: