See rest http requests for debugging

I’m experimenting with using REST for making calls to a rest service. I’m pretty sure I need to continue to tweak my REST requests, but it sure would be helpful to be able to see the actual HTTP session between Home Assistant and the remote service.

I’ve added the usual:

logger:
  default: info
  logs:
    homeassistant.components.rest: debug

but I only see in the logs:

2023-03-17 09:52:39.370 DEBUG (MainThread) [homeassistant.components.rest.data] Updating from https://www.example.com/api

2023-03-17 09:52:39.479 DEBUG (MainThread) [homeassistant.components.rest] Finished fetching rest data data in 0.110 seconds (success: True)

2023-03-17 09:52:39.480 DEBUG (MainThread) [homeassistant.components.rest.sensor] Data fetched from resource:

2023-03-17 09:52:39.480 WARNING (MainThread) [homeassistant.components.rest.sensor] Empty reply found when expecting JSON data

I’d like to see what exactly it’s sending to the remote service.

2 Likes

Have you found how to this ? I’ve been looking everywhere

Same problem … need to exactly know what was sent to the endpoint, but can’t debug it.