You can see that when the headers are created, it is adding "Authorization:Basic encoded-username-password" to the request. If I remove the authorization, then the request goes through fine (if I disable the password on the receiving device). I've inspected the headers, uri, etc. by logging the variables and the request looks good. Using SmartThings or the curl command also works.
If someone could help me out, that would be great!
The other methods are the exact same. Maybe you know why one way would work and the other wouldn't? At least I have a workaround. I did some packet sniffing to try and find the difference between the two requests:
GET /on HTTP/1.1
User-Agent: Linux UPnP/1.0 Hubitat
Authorization: Basic xxxxxxxxxxxxxxxxxxxx
I then tried to build the headers in the non-working request the same as the working version, but it didn't make a difference. Wish I could figure it out, but since I have something that works I'll probably call it day.
I ran into this exact thing as well I think. I have posted about it in a few places but lack any real technical experience to know what is going on.
Basically my rpi would reject a command using hubaction but a seemingly identical get command worked.
LOL at least I think we are both talking about the same thing. The logs on my pi showed the requests did not look quite identical. Like you requests work from nearly everywhere else. Just not the hubaction.
There is the original post - again I don't really know if it related - seems similar to me.