nomos-node/nomos-services/http/examples
gusto 4981c724af
Http status codes (#88)
* Include status codes in http error responses

* Mockpool bridges error handling

* Last TX in milliseconds in mempool metrics

* u64 for last tx metrics
2023-03-06 15:19:27 +02:00
..
README.md Http service api (#44) 2023-01-19 16:51:30 +02:00
axum.rs Http status codes (#88) 2023-03-06 15:19:27 +02:00
graphql.rs Http status codes (#88) 2023-03-06 15:19:27 +02:00

README.md

Http service examples

Axum.rs

A simple service to demonstrate how to register http handler for overwatch service.

To run this example use:

cargo run --example axum --features http

A GET enpoint will be registered at http://localhost:8080/dummy/. An endpoint corresponds with the Service name.

Graphql.rs

A demonstration of usage from within an overwatch service over the http.

To run this example use:

cargo run --example graphql --features http,gql

An enpoint will be registered at http://localhost:8080/dummygraphqlservice/. An endpoint corresponds with the Service name.

To query this endpoint use:

curl --location --request POST 'localhost:8080/dummygraphqlservice/' \
--data-raw '{"query":"query {val}","variables":{}}'

Every response should increment the val variable.

{"data":{"val":1}}