https://github.com/guardrail-dev/guardrail-sample-sbt-http4s-zio
Example of using http4s + catz + zio, clients and servers
https://github.com/guardrail-dev/guardrail-sample-sbt-http4s-zio
guardrail-sample
Last synced: about 1 year ago
JSON representation
Example of using http4s + catz + zio, clients and servers
- Host: GitHub
- URL: https://github.com/guardrail-dev/guardrail-sample-sbt-http4s-zio
- Owner: guardrail-dev
- License: mit
- Created: 2021-02-06T04:51:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-05T14:24:49.000Z (about 2 years ago)
- Last Synced: 2024-05-07T18:27:52.801Z (about 2 years ago)
- Topics: guardrail-sample
- Language: Scala
- Size: 79.1 KB
- Stars: 4
- Watchers: 3
- Forks: 4
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
guardrail-sample-http4s-zio
===
A simple project to show what a guardrail+http4s+zio service could look like.
Some sample curls:
#### getInventory
```bash
curl localhost:8080/api/v3/store/inventory | jq .
```
#### getOrderById
```bash
curl localhost:8080/api/v3/store/order/123 | jq .
curl localhost:8080/api/v3/store/order/124 # 404
```
#### placeOrder
```bash
curl localhost:8080/api/v3/store/order \
-H 'Content-Type: application/json' \
--data '{"id": 124, "petId": 44, "quantity": 10}' \
| jq .
```