If you test the connection with Postman, do you get the same result?
You probably know it, but just in case: Postman is a free app, see Free OCR API
If you see the problem even with Postman, a screenshot of the result could be helpful.
Hint: Postman can do code export! So for example, in the screenshot below it generated PHP code. This cURL PHP call works fine.
See also: