Implements a proxy to allow users to overwrite the req.body property (e.g. via body parsers) rather than have to reference a new parsedBody property.
To allow access to the original body, a req.raw property has been implemented.
The req.parsedBody has been left in place for backward compatibility reasons.
This is a breaking change as it changes the characteristics of the req.body property, which is fairly central to Opine and general request / server usage and patterns.
Issue
Fixes #26.
Details
Implements a proxy to allow users to overwrite the
req.body
property (e.g. via body parsers) rather than have to reference a newparsedBody
property.To allow access to the original body, a
req.raw
property has been implemented.The
req.parsedBody
has been left in place for backward compatibility reasons.This is a breaking change as it changes the characteristics of the
req.body
property, which is fairly central to Opine and general request / server usage and patterns.Hat tip to @DxSimonovski and their contribution https://github.com/asos-craigmorten/opine/pull/86. Too impatient to get this in so cherry picked bits and pieces to get it across the line! 😅
CheckList