rabbah commented on issue #2630: JSON encoding is inconsistent for web actions URL: https://github.com/apache/incubator-openwhisk/issues/2630#issuecomment-323243833 suggested patch ```bash diff --git a/core/controller/src/main/scala/whisk/core/controller/WebActions.scala b/core/controller/src/main/scala/whisk/core/controller/WebActions.scala index c963863..e50a08c 100644 --- a/core/controller/src/main/scala/whisk/core/controller/WebActions.scala +++ b/core/controller/src/main/scala/whisk/core/controller/WebActions.scala @@ -291,6 +291,11 @@ protected[core] object WhiskWebActionsApi extends Directives { complete(code, js) } + case Success(mediaType) if (mediaType == `application/json-patch+json`) => + respondWithHeaders(removeContentTypeHeader(headers)) { + complete(code, HttpEntity(`application/json-patch+json`, js.prettyPrint)) + } + ``` ```bash > curl -k https://guest.openwhisk/default/t?a=a -v < Content-Type: application/json-patch+json {"greeting":"Hello world"} ``` I wonder if we should also add `application/vnd.api+json`. ---------------------------------------------------------------- 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
