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
Post a Comment