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

c++ - list<myClass<int> * > sort -

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

java - why am i getting a "cannot resolve method" error on getApplication? -