Results 1 to 2 of 2

Thread: Big REST response

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    1

    Lightbulb Big REST response

    Hello:

    How can i manage big REST responses without memory exceptions?

    My app needs to load a response of about 5 Mb and i don't know how to manage it with Spring Android.

    Thank you!!!

  2. #2
    Join Date
    May 2010
    Location
    Angolo Terme, BS, Italy
    Posts
    57

    Default

    I would ask the same thing and reading the forum i find your post!

    In my old app I save the response to a FileOutputStream, then I created a custom Jackson Object mapper to get element by element, avoiding to map the received content to a list!

    Now the doc says that you can define your own MessageConverter, so I think that is possible to create a Jackson converter with a custom object mapper. I think is also possible to stream the response to a file!

    Let me know if you find a better solution!

    Bye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •