Reputation: 40821
To get the content length we usually use httpResponse.getEntity().getCotentLength()
. But to get the ETAG
Is it supposed to use httpResponse.getFirstHeader("ETAG")
? Both the Content-Length
and ETAG
are just headers of the response ,is the difference to access them due to the fact that the the Content-Length
are mandatory but ETAG
are optional?
Upvotes: 0
Views: 1974
Reputation: 2893
Yes, the content length is mandatory and the entity tag is optional so you can get optional values by : httpResponse.getFirstHeader("ETAG").
Upvotes: 1