Honor and merge all constructor options for Response
Honor body (.text(), .json() and formData()) and method on Request objects
"Lock down" content type header responses in test cases (Found that internal Font Resource plugin was not returning the correct content type - worth making a new issue?)
[x] We don't get much from each ctx.request from Koa, so we can't really flesh out more than this from an initial request. Not sure how much of a Request options is ultimately worth merging on or we can even support? Maybe a good discussion topic? - https://github.com/ProjectEvergreen/greenwood/discussions/1146
Related Issue
resolves #1048
Summary of Changes
Response
body
(.text()
,.json()
andformData()
) andmethod
onRequest
objectsTODO
Request
properties- https://github.com/thescientist13/greenwood-htmx/pull/3body
headers
query params
Response
propertiesstatus
statusText?return all header, like customx-secret
header in thePOST /api/submit
example in developexecuteRouteModule
API Routes1128
1139
Content-Type
header, nothing else to support at the moment - https://github.com/ProjectEvergreen/greenwood/blob/v0.29.0-alpha.2/packages/cli/src/lifecycles/bundle.js#L226request.formData
issues/1048
issues/1008
~~multipart/form-data~~
support (nice to have)? - https://github.com/ProjectEvergreen/greenwood/issues/1147Thoughts / Questions
ctx.request
from Koa, so we can't really flesh out more than this from an initialrequest
. Not sure how much of aRequest
options is ultimately worth merging on or we can even support? Maybe a good discussion topic? - https://github.com/ProjectEvergreen/greenwood/discussions/1146body
options. Not sure how to best handle / detect them in Koa for serialization though? Options like: - https://github.com/ProjectEvergreen/greenwood/issues/1147URLSearchParams
Blob