Skip to main content
Inspiring
Dec 8, 2021 5:16 PM UTC
Solved

WebAPI response in CSV format

Hello, 

Is there a way for a response from a webAPI to be returned in "application/csv"? I know it can return XML and JSON. But in this specific need, I need it in CSV format.

Thank you.

stefanhelzle0001
Brainy
Dec 8, 2021 6:23 PM UTC

Sure, but you have to create the text yourself. Use char(10) as a line separator.

4 replies

stefanhelzle0001
Brainy
Dec 8, 2021 6:23 PM UTC

Sure, but you have to create the text yourself. Use char(10) as a line separator.

alexl0007Author
Inspiring
Dec 13, 2021 12:31 PM UTC

Do you mean I have to add the logic in the body ? a!httpResponse { body: [logic here?] }

stefanhelzle0001
Brainy
Dec 13, 2021 12:45 PM UTC

Yes. Something like 

"firstname","lastname","age"char(10)
"john","doe","42"char(10)
.
.
.
.