Skip to content

francois-aubertin/scala-play-rest-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTful API written in Scala, using the Play Framework.

To start the application:
    ./activator run

And then http://localhost:9000

To use the REST API:
	curl -X POST http://localhost:9000/users -H "Content-Type: application/json" -d "{\"email\": \"test@test.com\"}"
	curl -X GET http://localhost:9000/users/1 
	
To test validation rules:

    A malformed email
    curl -X POST http://localhost:9000/users -H "Content-Type: application/json" -d "{\"email\": \"test\"}"

    An email that already exists for a user
    curl -X POST http://localhost:9000/users -H "Content-Type: application/json" -d "{\"email\": \"test@test.com\"}"
    curl -X POST http://localhost:9000/users -H "Content-Type: application/json" -d "{\"email\": \"test@test.com\"}"

About

RESTful API for a fictive user management microservice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published