adobe / aio-cli-plugin-app-dev

App Builder CLI - dev command
Apache License 2.0
0 stars 2 forks source link

Enable web:raw on local "aio app dev" #79

Closed gwatanab closed 2 months ago

gwatanab commented 2 months ago

Running "aio app dev" currently does not support "web: raw" yet, so I could not test receiving the multi-part data in params.__ow_body (it's empty). For now, I tested in stag Runtime which worked fine. Would you please add the support for "web:raw" in local dev environment as well?

aiojbot commented 2 months ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-3097

shazron commented 2 months ago

Current handling - a warning is printed: https://github.com/adobe/aio-cli-plugin-app-dev/blob/e6eb9221dd67bf0036953394ada48922ec6ec09b/src/lib/run-dev.js#L491-L493

If web:raw, we need to base64 encode the body and put it as __ow_body -- somewhere around here: https://github.com/adobe/aio-cli-plugin-app-dev/blob/e6eb9221dd67bf0036953394ada48922ec6ec09b/src/lib/run-dev.js#L553-L557

shazron commented 2 months ago

Certain content types are promoted to regular parameters:

  1. a JSON object (Content-type: application/json) OR
  2. form data (Content-type: application/x-www-form-urlencoded)
shazron commented 2 months ago

PR https://github.com/adobe/aio-cli-plugin-app-dev/pull/84/