A basic application to handle multipart form data using akka-http with test cases in Scala


Knoldus

In my previous blogs, I have talked about file upload and its test cases using akka-http.

Now, in this blog I am going to explain the handling of multi part form data in akka-http with the help of a basic application which contains the code and its test cases.

So Let’s start with the dependencies for the application.
You have to add the following dependencies in you build.sbt :

Now, we have to create a handler to handle multipart form data :

Whenever a file will come in request, a new file will be created in temp directory of your system.

Below, you can find the test cases for the handler :

I hope, you enjoyed it and it will be helpful for you.

You can get full code here

Happy Blogging !!!

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s