Reputation: 813
I'm trying to connect IBM Cloud Functions with a Watson Assistant dialog as web_action. So I have specified web_action as following in watson dialog json editor.
"actions": [
{
"name": "[email protected]_dev/default/callKinvey",
"type": "web_action",
"parameters": {
},
"credentials": "$private.mycredential",
"result_variable": "context.my_input_returned"
}
]
Now, the issue is while testing assistant I'm getting following error
Internal error: Content-type can not be retrieved. (and there is 1 more error in the log)
Following is my function that is created on IBM-cloud and enabled for Web Action:
/**
*
* main() will be run when you invoke this action
*
* @param Cloud Functions actions accept a single parameter, which must be a JSON object.
*
* @return The output of this action, which must be a JSON object.
*
*/
function main(params) {
return { message: 'Hello World' };
}
CURL of my function is:
curl -u API-KEY -X POST https://us-south.functions.cloud.ibm.com/api/v1/namespaces/[email protected]_dev/actions/callKinvey?blocking=true
Upvotes: 1
Views: 994
Reputation: 733
The easiest way to solve this type of error is to append .json
to your endpoint.
Upvotes: 2