Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Align parsing of the req parameter with VCL and petridish #36

Closed
tripodsan opened this issue Sep 6, 2018 · 3 comments
Closed

Align parsing of the req parameter with VCL and petridish #36

tripodsan opened this issue Sep 6, 2018 · 3 comments

Comments

@tripodsan
Copy link
Contributor

the req param is currently parsed as JSON. as mentioned in adobe/helix-cli#126 this might change.

@trieloff
Copy link
Contributor

trieloff commented Sep 6, 2018

And in adobe/helix-cli#126 what is req.params here is passed as params request parameter there.

@tripodsan
Copy link
Contributor Author

currently the pipeline gets already the dissected payload/action, as #7 (comment).

the openwhisk params.req is the encoded external request, and will become payload.request.
the openwhisk __ow_* is the internal request, and those properties become action.request

@trieloff
Copy link
Contributor

trieloff commented Sep 6, 2018

I don't think we can effectively encode the entire request and put it in params.req because:

  • generating JSON in VCL is error-prone
  • most of the interesting stuff (headers) are already passed in __ow_headers anyway

But we can have

  • one route for headers (through __ow_headers, to be put into payload.request.headers)
  • one route for params (through params.params (url encoded), to be put into payload.request.params)
  • one route for method (through params.method, to be put into payload.request.method)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants