OK, I have been trying something similar. I prepared a NodeRed web input node and changed the server on the code above to make the request to it. I noticed that the json data and the Google Vision Key arrive successfully. Still I could find no apparent reason for the problem.
In the process I noticed I am using WiFi.h and changed to WiFiSecure.h but the problem remains.
I will try your suggestion and see if I can understand what may be going wrong.
Thanks a lot.