Skip to content

ricardohsd/akka-http-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Execute sbt run and in a new terminal window:

  $ curl http://127.0.0.1:8081/users
  []
  $ curl -H "Content-Type: application/json" -X POST -d '{"name":"John"}' http://127.0.0.1:8081/users
  OK
  $ curl http://127.0.0.1:8081/users
  [{"name":"John"}]
  $ curl -H "Content-Type: application/json" -X POST -d '{"name":"John"}' http://127.0.0.1:8081/users
  The request could not be processed because of conflict in the request, such as an edit conflict.
  $ curl http://127.0.0.1:8081/users
  [{"name":"John"}]
  $ curl -H "Content-Type: application/json" -X POST -d '{"name":"Marc"}' http://127.0.0.1:8081/users
  OK
  $ curl http://127.0.0.1:8081/users
[{"name":"John"},{"name":"Marc"}]

About

Example of http server written in Akka Http

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages