You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/02 16:25:10 UTC

[GitHub] csantanapr commented on a change in pull request #3919: Allow raw JSON string as response for webaction without base64 encoding.

csantanapr commented on a change in pull request #3919: Allow raw JSON string as response for webaction without base64 encoding.
URL: https://github.com/apache/incubator-openwhisk/pull/3919#discussion_r207290687
 
 

 ##########
 File path: tests/dat/actions/echo-web-http.js
 ##########
 @@ -2,11 +2,9 @@
 // license agreements; and to You under the Apache License, Version 2.0.
 
 function main(params) {
-    var bodyobj = params || {};
-    bodystr = JSON.stringify(bodyobj);
     return {
         statusCode: 200,
         headers: { 'Content-Type': 'application/json' },
-        body: new Buffer(bodystr).toString('base64')
+        body: params
 
 Review comment:
   `body` can be `string` or `object`, today we support `object` and want to make sure we continue to support it.
   With this PR what we are doing is in addition of supporting a `dict`/`object`  to also allow `string`.
   
   or I'm missing something else?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services