Add 'GET /' endpoint for getting the program state (experimental)

Related #3372
This commit is contained in:
Junegunn Choi
2023-09-03 16:30:35 +09:00
parent c5e4b83de3
commit 0f50dc848e
5 changed files with 121 additions and 16 deletions

View File

@@ -14,6 +14,14 @@ CHANGELOG
# Client
curl localhost:6266 -H "x-api-key: $FZF_API_KEY" -d 'change-query(yo)'
```
- `--listen` server can report program state in JSON format (`GET /`)
```sh
# fzf server started in "headless" mode
fzf --listen 6266 2> /dev/null
# Get program state
curl localhost:6266 | jq .
```
- Added `toggle-header` action
- Bug fixes