I would like to know how to build a request with server's IP address (not URL).
Actually I start with a given URL and then with the help of lenses rebuild the request:
connect = do
request' <- parseRequest "http://localhost"
let request = setRequestMethod "POST"
$ setRequestHost (S8.pack ("xx.xxx.xxx.xxx"))
$ ...
It works fine but it's inelegant, clumsy code.