replaced the httpdefaultclient with httpurlconnection class