Skip to content

Parse Middleware

Compare
Choose a tag to compare
@blakeembrey blakeembrey released this 12 Jul 02:43
· 126 commits to master since this release

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 and json 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))