techmonad / learning-akka-http

It is sbt sample project for quick start with writing Rest api using Akka Http.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

learning-akka-http

Run application

   $ sbt run 

test rest endpoints

   // get all persons
   $ curl -XGET 'localhost:8000/person/getAll'
     output => [{"name":"Bob","email":"bob@gmail.com","age":32}]
   
   //get person by name
   $ curl -XGET 'localhost:8000/person/getByName?name=bob'
            output => [{"name":"Bob","email":"bob@gmail.com","age":32}]
            
    
    // save person  
   $ curl -XPOST 'localhost:8000/person/save' -d'{"name":"Joy","email":"joy@gmail.com","age":30}'
    // Person saved successfully

About

It is sbt sample project for quick start with writing Rest api using Akka Http.


Languages

Language:Scala 100.0%