body
body copied to clipboard
Body parsing
This update is to make sure that the passed stream parameter is actually an instance of stream, given that the "write" and "end" methods are commonly used for other type...
ref. https://github.com/Raynos/body/issues/10
Before the library required that the content-type of a JSON request to be "application/json", however by the spec, mime-subtypes of application json (Those ending in `+json` like `application/vnd.api+json` are also...
``` raw-body ~1.1.0 → ~2.1.6 safe-json-parse ~1.0.1 → ~4.0.0 after ~0.7.0 → ~0.8.1 test-server ~0.1.3 → ~0.2.1 send-data ~1.0.1 → ~8.0.0 tape ~2.3.0 → ~4.5.1 process ~0.5.1 → ~0.11.2 error...
So `anyBody` only really accepts json or form encoded bodies, which makes the name of the function a bit confusing. I would expect it to fall back to the default...