How to call OCR free api from java code

I am trying to call , this api "
curl --location ‘https://api.ocr.space/parse/imageurl?apikey=helloworld&url=http%3A%2F%2Fi.imgur.com%2FfwxooMv.png

from my java code
but always getting error image is corrupted , even working fine directly from postman
can you share any maveen java project where you called ocr free api

Thanks

You can use the PostMan code export feature or start with this OCR API Java sample code.