From 4be66bea97d3582831e34bb10fdb8cc80982cd47 Mon Sep 17 00:00:00 2001 From: benzlokzik <121052717+benzlokzik@users.noreply.github.com> Date: Mon, 6 Nov 2023 07:56:31 +0300 Subject: [PATCH] added guide for endpoints --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 13c1d9a..7b67cf0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ Simple http Fahrenheit/Celsius/Kelvin converter using [actix-web](https://actix.rs/). - --- > [!NOTE]\ @@ -28,3 +27,41 @@ Via Docker: docker build -t fahrenheit-celsius-converter . docker run -p 8080:8080 fahrenheit-celsius-converter ``` + +## API + +### Convert Fahrenheit to Celsius + +```bash +curl -X GET "http://localhost:8080/convert/f_to_c/100" +``` + +### Convert Celsius to Fahrenheit + +```bash +curl -X GET "http://localhost:8080/convert/c_to_f/100" +``` + +### Convert Fahrenheit to Kelvin + +```bash +curl -X GET "http://localhost:8080/convert/f_to_k/100" +``` + +### Convert Kelvin to Fahrenheit + +```bash +curl -X GET "http://localhost:8080/convert/k_to_f/100" +``` + +### Convert Celsius to Kelvin + +```bash +curl -X GET "http://localhost:8080/convert/c_to_k/100" +``` + +### Convert Kelvin to Celsius + +```bash +curl -X GET "http://localhost:8080/convert/k_to_c/100" +```