Invoking servlet in order to download a file

Hi all.

Im trying to make HTTP request in order to call a servlet like link.
For example

Normal behaivour If you copy link on Chrome, is the download of a file (a json or an xml).

But when I try with HTTP activity I have status code 200 but in response a javascript.

How should I do?