Openwhisk: do not base64 encode __ow_body for raw web actions

Created on 31 Jul 2018  路  2Comments  路  Source: apache/openwhisk

3919 removes the base64 encoding requirement when returning JSON as string (and setting the content-type). However we continue to encode JSON for raw http actions receiving __ow_body. For symmetry, we should stop doing that as well. This is largely in place for legacy reasons (spray vs akka). The net of this change is that functions would JSON.parse(param.__ow_body) instead of JSON.parse(decode64(param.__ow_body)).

controller good first issue help wanted

All 2 comments

this change will introduce backward compatibility issues, if you just change the encoding.
that is needed is a flag that indicates if the body is base64 encoded or not. eg: __ow_body_isbase64

Indeed it would be backward incompatible. The flag is a great way to transition.

Was this page helpful?
0 / 5 - 0 ratings