Repository: ProjectEvergreen/greenwood (js)

Issue:
`request.json` not working in API Routes with current AWS based adapter plugins (AWS, Netlify)
### What happened?

Observed in [this project](https://github.com/AnalogStudiosRI/api/pull/44) that when using `request.json` to accept an incoming JSON request when using either the AWS or Netlify adapter plugins, depending on the hosting platform, the function would either crash or return incomplete response data.  Either way it wouldn't work 😅 


![Image](https://github.com/user-attachments/assets/7681987c-bd0a-41ea-a33c-122e8295c323)

```js
export async function handler(request) {
  const data = await request.json();
  const now = new Date().getTime();
  const message = `Webhook "${data.name}" sent at "${data.time}" was successfully processed at "${now}".  Thank you!`;

  return new Response(JSON.stringify({ message }), { 
    headers: {
      "Content-Type": "application/json"
    }
  })
}
```

### Steps to reproduce

1. Create an API route (e.g. _src/pages/api/event.js_)
1. Expect / assume an incoming JSON request
1. Use `request.json` to extract the body contents as JSON

### Environment

- Any Greenwood version
- AWS Adapter (SST, Architect, etc)
- Netlify Adapter

(seems Vercel automatically provides JSON data as JSON, hence we still want to keep stringifying)

### Additional Context

Was able to confirm in our all our relevant demo repos
- https://github.com/ProjectEvergreen/greenwood-demo-adapter-netlify/pull/28/files#diff-29c84804a6f5289bf59051337539098f2f21eeb01df8070de18657e138f919bf
- https://github.com/ProjectEvergreen/greenwood-demo-adapter-aws/pull/8/files#diff-4c485f149be896d1ddd46300da8c3c88d6a8e7d8b081ac9c2bc5ff8629ea88a5
- https://github.com/ProjectEvergreen/greenwood-demo-adapter-aws/pull/5/files#diff-4c485f149be896d1ddd46300da8c3c88d6a8e7d8b081ac9c2bc5ff8629ea88a5

Pull request description:
bug/issue 1460 proper `request.json` support for AWS based adapters
<!--
## Submitting a Pull Request
We love contributions and appreciate any help you can offer!
-->

## Related Issue

resolves #1460 

## Documentation 

N / A

## Summary of Changes

1. Properly handle `request.json` for AWS based adapter plugins

Patch:
diff --git a/packages/plugin-adapter-aws/src/index.js b/packages/plugin-adapter-aws/src/index.js
index 724fccf3..f8ea9a3b 100644
--- a/packages/plugin-adapter-aws/src/index.js
+++ b/packages/plugin-adapter-aws/src/index.js
@@ -32,8 +32,6 @@ function generateOutputFormat(id, type) {
         // https://stackoverflow.com/a/43521052/417806
         format = formData;
         delete headers['content-type'];
-      } else if(contentType.includes('application/json')) {
-        format = JSON.stringify(body);
       }
 
       const req = new Request(new URL(\`\${rawPath}\${queryParams}\`, \`http://\${headers.host}\`), {
diff --git a/packages/plugin-adapter-netlify/src/index.js b/packages/plugin-adapter-netlify/src/index.js
index 6fc9eef4..1271ca05 100644
--- a/packages/plugin-adapter-netlify/src/index.js
+++ b/packages/plugin-adapter-netlify/src/index.js
@@ -34,8 +34,6 @@ function generateOutputFormat(id) {
         // https://stackoverflow.com/a/43521052/417806
         format = formData;
         delete headers['content-type'];
-      } else if(contentType.includes('application/json')) {
-        format = JSON.stringify(body);
       }
 
       const request = new Request(rawUrl, {


Test patch:
diff --git a/packages/plugin-adapter-aws/test/cases/build.default/build.default.spec.js b/packages/plugin-adapter-aws/test/cases/build.default/build.default.spec.js
index ade1bd5d..bd41284a 100644
--- a/packages/plugin-adapter-aws/test/cases/build.default/build.default.spec.js
+++ b/packages/plugin-adapter-aws/test/cases/build.default/build.default.spec.js
@@ -192,7 +192,7 @@ describe("Build Greenwood With: ", function () {
             host: hostname,
             "content-type": "application/json",
           },
-          body: { name },
+          body: JSON.stringify({ name }),
           requestContext: {
             http: {
               method: "POST",
diff --git a/packages/plugin-adapter-netlify/test/cases/build.default/build.default.spec.js b/packages/plugin-adapter-netlify/test/cases/build.default/build.default.spec.js
index 1490596d..6d870230 100644
--- a/packages/plugin-adapter-netlify/test/cases/build.default/build.default.spec.js
+++ b/packages/plugin-adapter-netlify/test/cases/build.default/build.default.spec.js
@@ -247,7 +247,7 @@ describe("Build Greenwood With: ", function () {
         const response = await handler(
           {
             rawUrl: `${hostname}/api/submit-json`,
-            body: { name: param },
+            body: JSON.stringify({ name: param }),
             httpMethod: "POST",
             headers: {
               "content-type": "application/json",