forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.tpl
51 lines (31 loc) · 1.32 KB
/
README.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# {{crate}}
Current version: {{version}}
## apiclient binary
The `apiclient` binary helps you talk to an HTTP API over a Unix-domain socket.
It talks to the Bottlerocket socket by default.
It can be pointed to another socket using `--socket-path`, for example for local testing.
The URI path is specified with `-u` or `--uri`, for example `-u /settings`.
This should include the query string, if any.
The HTTP method defaults to GET, and can be changed with `-m`, `-X`, or `--method`.
If you change the method to POST or PATCH, you may also want to send data in the request body.
Specify the data after `-d` or `--data`.
To see verbose response data, including the HTTP status code, use `-v` or `--verbose`.
### Example usage
Getting settings:
```
apiclient -m GET -u /settings
```
Changing settings:
```
apiclient -X PATCH -u /settings -d '{"motd": "my own value!"}'
apiclient -m POST -u /tx/commit_and_apply
```
You can also check what you've changed but not commited by looking at the pending transaction:
```
apiclient -m GET -u /tx
```
(You can group changes into transactions by adding a parameter like `?tx=FOO` to the calls above.)
## apiclient library
{{readme}}
## Colophon
This text was generated from `README.tpl` using [cargo-readme](https://crates.io/crates/cargo-readme), and includes the rustdoc from `src/lib.rs`.