conn.receiveResponseEntity(connected);
conn.tunnelCreated(false, getParams());
System.out.println("layering secure connection");
conn.layerProtocol(ctx, getParams());
// finally we have the secure connection and can send the request
System.out.println("sending request");
conn.sendRequestHeader(req);