I would like to download a csv file from a webpage, however when I send the HTTP request the return is Empty(). My code is as follows:</CODE><CODE class=" language-jsl">
request = New HTTP Request( URL( url), Method( "Get" ), Headers( {"Authorization: Bearer " || token} ));
data = request << send;I receive the following response header, so I'm confident I am accessing the server:
GetResponseHeaders = ["content-disposition" => "attachment; filename=text.csv", "content-type" => "text/csv; charset=utf-8", "date" => 06Mar2024:17:08:05, "server" => "uvicorn", "transfer-encoding" => "chunked"];
However data is Empty(). I would like to download the text.csv file, but have been unable to find a way to do so in JSL.
Most likely, at least partially, depends on your endpoint. HTTP request get (file download): Operation timed out after 60000 milliseconds or maybe
<< Download would work

Names Default To Here(1);
request = New HTTP Request(
URL(
"https://community.jmp.com/kvoqx44227/attachments/kvoqx44227/sample-data/49/1/BlueBirds.jmp"
),
Method("Get")
);
file = request << Download(
"$TEMP/BlueBirds.jmp", "replace", "show progress"
);
If(!Is Empty(file),
Open(file)
);