What header needs to be included to get the response as a file from a webservice?

Hi All,

I am working on a web service. I have the end url, parameter and an api key in the header. Everything is working fine. I am getting the response in json format, I want to get the response as csv file. I came to know that we need to include “Content-Disposition”,“attachement;filename=displayName-DemoFile.txt” this in the header section.I am little confused on how to include it. Please throw some light if you ever had faced this situation.

Thanks.