Rest switch - Claims resource not reachable although it is via curl

Im struggling to create a simple rest api switch.
I have a raspberry pi listening on port 8080 and its ip is 10.0.0.85.
When I configure it as a switch:
switch:
- platform: rest
resource: http://10.0.0.85:8080/api/v1/temp/Work+room
name: Guest room A/C
body_on: ‘{“damper”:“high”, “temp”:24, “room”:“Work room”}’
body_off: ‘{“damper”:“off”, “room”: “Work room”}’
is_on_template: ‘{{value_json.damper == “high”}}’

I see in the log file:

Can’t turn on http://10.0.0.85:8080/api/v1/temp/Work+room. Is resource/endpoint offline?

The frustrating thing is that If I listen on the same port on my computer, and change the IP accordingly (10.0.0.24), it works!
If I just ping the IP from the hass env, its reachable and If I try curl from there, it works as well.
What am I missing here?