Android HttpURLConnection only get info in header, not download -


i use httpurlconnection headers url: https:///abc.com//test.mp4

httpconnection = (httpurlconnection) url.openconnection(); httpconnection.setconnecttimeout(10000); httpconnection.setreadtimeout(10000); httpconnection.setrequestmethod(constants.http.get); httpconnection.setrequestproperty("user-agent", constants.user_agent); httpconnection.connect(); final int responsecode = httpconnection.getresponsecode(); // stuck , file downloaded here // logcat showing: ssl=0x6bc1ba20 sslread buf=0x428cf908 len=1500,timeo=100 many time, phone fetch many many data network. // wait long time before disconnect. httpconnection.disconnect(); // content length, header,... here 

how header of url without download file ? thanks


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -