willow icon indicating copy to clipboard operation
willow copied to clipboard

Trailing slash in openHAB URL leads to error

Open happenpappen opened this issue 9 months ago • 1 comments

When selecting "openHAB" as command endpoint in WAS and setting the openHAB URL to "https://:8443/" the client will call the rest api with URL "https://:8443//rest/..." like in this example:

`I (05:27:42.682) WILLOW/OPENHAB: sending 'Light on the bathroom.' to openHAB REST API on 'https://example.org:8443//rest/voice/interpreters'

I (05:27:43.198) WILLOW/HTTP: HTTP status='405' content_length='618' `

which will lead to an error "POST is not supported by this URL...". When i remove the trailing slash, the call will succeed.

Don't know, if this is more an openHAB or a Willow issue, but i think the double slash should be handled anywhere...

happenpappen avatar May 23 '24 16:05 happenpappen