drashland / drash

A microframework for building JavaScript HTTP applications. Runtime-agnostic. Strongly typed.
https://drash.land/drash
GNU General Public License v3.0
1.08k stars 32 forks source link

feat(http/server): add new config for control flow changes #669

Closed crookse closed 2 years ago

crookse commented 2 years ago

Summary

What:

604 requested access to the request body. This was solved by allowing the original request to be cloned and accessed via request.original. While this kept the body intact and prevented bodyUsed from being true, Drash.Request.parseBody() still runs and expects the request body to be a specific set of content-types. This needs to be changed. However, this is needs to be a non-breaking change and means we might need to introduce a server config to change the request's flow. For example:

Why:

Quick fix to allow this functionality in v2. We should've moved this to a service, but hindsight is always 20/20. We can move this to a service in v3. Issue is here: #668.

Acceptance Criteria

Below is a list of tasks that must be completed before this issue can be closed.