I came here looking for answers and thought I'd share for the next person. No quotes needed on a 2023 Macbook Pro.
docker compose exec -it user-portal wget --post-data "xxx" http://backend:4000 Connecting to backend:4000 (192.168.64.4:4000) wget: server returned error: HTTP/1.1 401 Unauthorized