Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 433 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 433 Bytes

Learn Scala: Simple HTTP API with Http4s and Tapir

Path: /math/{operation}/calculate
Request: {"x":10, "y":27}
Response: {"result":"37"}

Example query:

curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"x":"10","y":"27"}' \
  http://localhost:8080/math/plus/calculate

Prerequisites:

brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk11
brew install sbt