How do I construct a URL from any resource handle?

Hello Developers,
Any inputs will be highly appreciated