Example for simple get a file

What is the best way to get a file from a server. (Server with XData REST API)
e.g. a Reportserver generates a pdf-file and the client wants to show/save it.

Do you have an example code for this?

Best regards
Thomas

Edit: not only pdf, also every other kind of file

Just return the file content from a service operation in a TStream result:

https://download.tmssoftware.com/business/xdata/doc/web/supported_types.html

[HttpGet] function BuildCustomDocument(CustomerId: integer): TStream;

I knew it had to be very easy. ;-)
Many Thanks
Thomas

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.