Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Latest commit

 

History

History
32 lines (20 loc) · 779 Bytes

File metadata and controls

32 lines (20 loc) · 779 Bytes

File Download

This recipe demonstrates both custom message serializers and adding headers to a response, by implementing a simple CSV download service intended for web browsers to access directly.

Testing the recipe

Automated tests

You can test this recipe using the provided tests:

sbt test

Manual tests

You can also test this recipe manually.

In a terminal, start the service:

sbt runAll

Wait for the messages confirming that the service has started:

[info] Service file-download-impl listening for HTTP on 0:0:0:0:0:0:0:0:53836
[info] (Service started, press enter to stop and go back to the console...)

Then, visit http://localhost:9000/downloadEmployees in a web browser. It will download a file called employees.csv.