https add user defined cookie file and headers,but not tested,also,i think it's a waste closing connection after retriving contentlength