Add resolve function

I just add a resolve function to let us to request a url with domain name, rather than a ip address.