1
0
mirror of synced 2025-01-13 01:04:26 +00:00
gusto 8e2346c29e
Rust 1.67 cargo clippy fix (#56)
* Run clippy --fix for updated lint requirements

* Fmt after clippy
2023-01-27 11:04:42 +02:00
..
2023-01-27 11:04:42 +02:00
2023-01-25 07:24:33 -08:00
2023-01-19 16:51:30 +02:00

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}}