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:
If the config is present, then don't parse the request body.
If the config is present, then parse the body like we currently do.
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.
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 preventedbodyUsed
from beingtrue
,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.