A local webserver to keep status of microphone mute state
The REST API to this app is described below.
GET /state
curl -i -H 'Accept: application/json' http://localhost:29290/state
HTTP/1.1 200 OK
content-type: application/json
Access-Control-Allow-Origin: *
cache-control: max-age=30s
surrogate-control: max-age=0
Date: Tue, 04 Jan 2022 22:21:38 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
{"muted":false}
GET /mute
curl -i -H 'Accept: application/json' http://localhost:29290/mute
HTTP/1.1 200 OK
content-type: application/json
Access-Control-Allow-Origin: *
cache-control: max-age=30s
surrogate-control: max-age=0
Date: Tue, 04 Jan 2022 22:21:38 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
{"muted":true}
GET /unmute
curl -i -H 'Accept: application/json' http://localhost:29290/unmute
HTTP/1.1 200 OK
content-type: application/json
Access-Control-Allow-Origin: *
cache-control: max-age=30s
surrogate-control: max-age=0
Date: Tue, 04 Jan 2022 22:21:38 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
{"muted":false}
GET /sse
curl -i -H 'Accept: application/json' http://localhost:29290/mute
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Type: text/event-stream
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Cache-Control, Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With
Date: Tue, 04 Jan 2022 22:24:43 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
event: state
data: {"muted":true}
...
event: state
data: {"muted":true}