400: Bad Request error with Unifi Controller

I was wrong about it not working with basicauth anywhere in the file. I think i was running into the issue with the browser sending the header automatically.