apache - Is there a way to not download body during Java HttpClient call when the resource is large? -


i'm trying prevent org.apache.http.client.httpclient (link text) downloading body when resource let's on 10 mb.

what have done after searching here, , others head call, check content-length header, , if it's < 10mb, call, response body.

would there better solution this? want avoid call.

thanks.

you can regular call , check length, , if length > 10mb break , cancel download. problem socket still download as possible before cancel. think doing head call best method.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -