I need HA to send response to Webhook requests

Hello,

I have an external service making Webhook calls to my Home Assistant.
The automation is calling a Python script, and I am able to deal with JSON data in the POST request.
Then, as a response to this request (in the same HTTP session, no subsequent API callback), I need to send some data back to my external service from the Python script.
Is there a way to do that?

This is the type of response my external service gets today, after a request to the webhook:
< HTTP/1.1 200 OK
< Server: ************
< Date: Tue, 20 Aug 2019 19:43:40 GMT
< Content-Type: application/octet-stream
< Content-Length: 0
< Connection: keep-alive
< Strict-Transport-Security: max-age=31536000; includeSubdomains

I would like to set the Content-Type to application/json and feed the body response with some json data.

Regards,

Yanik

Sorry to necro a really old thread, but this is something I’m looking at at the moment. Can’t find anything anywhere to suggest this is something that can be done – does anyone yet know if this is possible?

I believe the answer to be no., unless you create a custom integration.