Skip to content

Sent response body cannot be easily accessible in continuing middlewares #87

Open
@esteban-filardi

Description

@esteban-filardi

The requirement for my app is the following:

"Log all incoming requests (including the request's response body)".

Even if there is the option continueMiddleware to continue executing a following middleware, it isn't possible to access the response of the token() method in that next middleware. Because of that, I can't easily log the response of the API method to obtain a token.

Maybe it would be feasible to store the response body inside the res object before send it in order to be able to have access it in the following middlewares of the chain.

Alternatively, an option could be added to just obtaining the response body of oauth-node-server but not sending it over automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions