Using utter message with http server

I have created a custom action that runs successfully and displays output to the terminal while testing.

However when i create a http-server (using python -m -d models/current/dialogue -u models/current/nlu --endpoints endpoints.yml --enable_api --cors "*") the output is not captured via the api.

I use the following http endpoint: http://localhost:5005/conversations/default/respond

I send the query and receive the response of the bot in the response of the request to the above url.

The above works well on normal conversations but fails to display the output from the action.