How to use getUrl ??

How to use getUrl ??

Hello how are you?

I would like to know if method getUrl can set a ip public ? For example, 138.121.141.251:8080

Regards