cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Remove the cookie from the response of HTTP Get while writing a file

kunal_savlani
New Contributor

Hi, I am trying to make an HTTP request which returns content of a CSV file via REST GET. The problem is am getting garbage content in first 2 characters of response which I suspect to be cookie. I want to remove this cookie from the response so that it does get into the file content. I tried using replace method of string but that in turns into formatting issue of the header. 

1 REPLY 1

ddellsperger
Employee
Employee

The first two characters are likely the byte order mark, this is automatically handled by the CSV Parser Snap. I'd suggest you use the HTTP Client snap and set the output view type to binary, then forward the contents to a CSV Parser Snap directly.  Alternatively, you can use a Mapper or Document to Binary to convert the output of REST Get to a binary and then send it to a CSV Parser Snap. Below are screenshots of the HTTP Client snap views tab (with the output set to Binary), a pipeline to compare doing this with REST Get vs. HTTP Client, and a screenshot of the Mapper converting the entity from the REST Get to the content of binary output data.

ddellsperger_0-1702648638465.png

ddellsperger_1-1702648658110.png

ddellsperger_2-1702648744167.png