As per my SO question here:
What is the best way to go about measuring the size of the response when using RESTTemplate?
I figure I'll have to count the bytes from the response somehow, but I'm not sure where to do that at.
I'm already extending RESTTemplate to allow for GZip compression, so I figure there is just a method in there I can override, if it's not already built in.
Most, if not all, of my requests are structured like so:
And then later:Code:// Just applies app wide auth and SSL info, returns a GzipRestTemplate RestTemplate r = RestTemplateFactory.make( mContext ); BaseModelListRequest jsonData = null; jsonData = r.getForObject( uri[0], BaseModelListRequest.class );
If there is already a facility to do this, then I'm missing it in the docs, and if there isn't if someone could guide me as to what the most seamless insertion of such a function would be, I'd appreciate it very much.Code:private LinkedHashMap< String, BaseModel[] > mObjects; mObjects = jsonData.getAllContent();


Reply With Quote