Add resolve function

I just add a resolve function to let us to request a url with domain name, rather than a ip address.
Merge pull request #24 from Hevienz/master

Add resolve function