HTTPRequestHandler Download File

HTTPRequestHandler Download File

  

I am using the method GetRequest_Submit to download a zip file from an url. but the binary content is null.

the URL is :https://www.dropbox.com/sh/8ha53xb45ppr5u7/AAB8NzqWY4TyRU7uAT9FkavXa?dl=1 

Also i would like to know the filename

Hi Filipe, you can try out the solution presented by Leonardo Fernandes to a similar question: https://www.outsystems.com/forums/discussion/34053/binary-download/

Basically, don't use the GetRequest_Submit of the HTTPRequestHandler. Instead, create a REST consumer and map the content of the body to an output parameter of the action having type binary data. This will work! 

In order to get the name of the file downloaded, you need to check the value of the content-disposition http header present in the response. The value of this header is attachment; filename="name of the file". Map this header to another output parameter of the REST consumer and manipulate the text in order to extract the filename.

Hope this helps.

Greetings, pedro