allow passing headers
extract path/host if a url is passed to request