Skip to content

drmick/haskell-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haskell Rest API

Build

docker-compose build

Run

docker-compose up

Use

# Register new user
curl -X POST -H "Content-Type: application/json" -d '{"username": "scott", "password": "tiger"}' http://localhost:3000/sign_up

# Add Book
curl -u scott:tiger -X POST -H "Content-Type: application/json" -d '{"title": "Crime and punishment"}' http://localhost:3000/books/

# List Books
curl -u scott:tiger -X GET -H "Content-Type: application/json" http://localhost:3000/books/

# Get Book
curl -u scott:tiger -X GET -H "Content-Type: application/json" http://localhost:3000/books/1

# Update Book
curl -u scott:tiger -X PUT -H "Content-Type: application/json" -d '{"title": "War and Peace"}' http://localhost:3000/books/1

# Delete Book
curl -u scott:tiger -X DELETE -H "Content-Type: application/json" http://localhost:3000/books/1

About

Haskell Rest API

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors