[api] add toProxy method to allow absolute URLs to be sent when sending to another proxy fixes #603
[fix] set connection to CLOSE in cases where the agent is false.