Support for virtual hosted-style requests

Look at this changes please. It implements support for virtual hosted-style api. I use it for myselfs purposes.
If it's ok, i will append information in readme.