rabbah commented on a change in pull request #2609: Support json response in 
HTTP web actions without base64 encoding.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2609#discussion_r133010527
 
 

 ##########
 File path: docs/webactions.md
 ##########
 @@ -102,11 +102,13 @@ function main(params) {
     return {
         statusCode: 200,
         headers: { 'Content-Type': 'application/json' },
-        body: new Buffer(JSON.stringify(params)).toString('base64'),
+        body: params
     };
 }
 ```
 
+The default content-type for an HTTP response is `application/json` and the 
body may be any allowed JSON value. The default content-type may be omitted 
from the headers.
 
 Review comment:
   Content is still sent in base64 format for raw http actions. This is not 
affected by this pr. 
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to