I have written a scraper that fetches images from my clients feed. I have noticed that if the url is not absolute, I get 400 error (Bad Request
) from the client. Does anyone know how to convert relative url to absolute url in Java?
This is my input url https://www.sevilleclassics.com/../uploads/products/Bin-Rack.jpg
and my output url (absolute one) should look like https://www.sevilleclassics.com/uploads/products/Bin-Rack.jpg
(difference is /../uploads
vs /uploads
)