Parse Middleware
Sometimes, you release something and it's not until you take a nap that you realise there's a better pattern to use. This was one of those times. Refactored text parsing methods (JSON and URL-encoded responses) back into a middleware method.
Changed
- Removed
urlencoded
andjson
types from transport, moved to a middleware plugin (popsicle.plugins.parse('json')
) - this is pretty nifty because now you can use Popsicle like 6.x again by doing.use(popsicle.plugins.parse(['json', 'urlencoded'], false))