@@ -12,7 +12,7 @@ SpO₂ doesn't support SSL out of the box, if you need [you can setup an Nginx s
12
12
13
13
## Usage
14
14
15
- You must have installed Rust on your computer.
15
+ You must have [ installed Rust] ( https://rustup.rs/ ) on your computer first .
16
16
17
17
``` bash
18
18
# to try it in debug mode
@@ -36,38 +36,35 @@ cargo run --release
36
36
37
37
### Add or Update a new URL to health check
38
38
39
+ Calling this route is "kind of" idenpotent, it means that it will not run another health checker on this URL but the custom json data will be updated.
40
+
39
41
``` bash
40
42
curl -i -X PUT ' http://127.0.0.1:8000/?url=http%3A%2F%2Flocalhost%2Fhealth' -d ' "your custom json data"'
41
43
42
44
# Note that 'http%3A%2F%2Flocalhost%2Fhealth' is the url to health check
43
45
# but it is url encoded and correspond to 'http://localhost/health'
44
-
45
- # Calling this function is "kind of" idenpotent, it means that it will not run another
46
- # health checker on this URL but the custom json data will be updated
47
46
```
48
47
49
48
### Remove an health checked URL
50
49
50
+ Calling this route will remove the URL from the health check pool and return you the custom json data associated with it.
51
+
51
52
``` bash
52
53
curl -i -X DELETE ' http://127.0.0.1:8000/?url=http%3A%2F%2Flocalhost%2Fhealth'
53
-
54
- # Calling this function will remove the URL from the health check pool
55
- # and return you the custom json data you associated to it
56
54
```
57
55
58
56
### Get an health checked URL data
59
57
58
+ Will return the associated data of an already health checked URL.
59
+
60
60
``` bash
61
61
curl -i -X GET ' http://127.0.0.1:8000/?url=http%3A%2F%2Flocalhost%2Fhealth'
62
-
63
- # Will return the associated data of an already health checked URL
64
62
```
65
63
66
64
### Get all the health checked URLs
67
65
66
+ Will return the list of all the health checked URLs aloang with the data associated with them.
67
+
68
68
``` bash
69
69
curl -i -X GET ' http://127.0.0.1:8000/all'
70
-
71
- # Will return the list of all the health checked URLs
72
- # with the data associated with them
73
70
```
0 commit comments