Announcement Announcement Module
Collapse
No announcement yet.
REST Response Size Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • REST Response Size

    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:

    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 );
    And then later:

    Code:
    private LinkedHashMap< String, BaseModel[] > mObjects;
    
    mObjects = jsonData.getAllContent();
    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.

  • #2
    Currently, RestTemplate does not provide a mechanism for determining the download progress. We have an open feature request for adding this functionality [0] in a future release.

    [0] https://jira.springsource.org/browse/ANDROID-51

    Comment

    Working...
    X