Uses Rust Actix framework for exposing an API
167
This is a Hello API, which exposes two endpoints, GET and POST and return the response in the following structure,
{"from":"Rust - Actix","message":"Hello from Rust","status":true}
Pull the image and run them on desired port. To test the endpoints use curl or another API testing tool.
GET
curl http://localhost:8080/
{"from":"Rust - Actix","message":"Hello from rust","status":true}
POST
curl http://localhost:8080/ -X POST -H 'Content-Type: application/json' --data '{"name":"YOUR_NAME"}
{"from":"Rust - Actix","message":"Hello, YOUR_NAME!","status":true}
Content type
Image
Digest
sha256:0902fa1c0…
Size
28.4 MB
Last updated
over 1 year ago
docker pull apiprimer/hello-rust