Fix connection to proxy functionality

* It was broken since the big code refactoring
* Sending a request to an endpoint which is not 'https' is NOT supported at the moment (it is not supported in any version of lhttpc).