adds defaulthttpclient implementation. fixes bugs on httpurlconnection implementation.