csantanapr 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_r132828970
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/controller/WebActions.scala
 ##########
 @@ -241,7 +241,7 @@ protected[core] object WhiskWebActionsApi extends 
Directives {
 
             fields.get("body") map {
                 case JsString(str) => interpretHttpResponse(code, headers, 
str, transid)
-                case _             => terminate(BadRequest, 
Messages.httpContentTypeError)(transid)
+                case js            => interpretHttpResponseAsJson(code, 
headers, js, transid)
 
 Review comment:
   Those this case checks forts for js before it checks for base64 case? Making 
this code optimized for common case (i.e. Json string)
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to