You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-1Lines changed: 33 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,37 @@ Since the rest-shell is aware of environment variables and system properties, yo
185
185
... resources for this URL
186
186
http://mylongdomain.com/api:>
187
187
188
+
### Per-user shell initialization
189
+
190
+
The rest-shell supports a "dotrc" type of initialization by reading in all files found in the `$HOME/.rest-shell/` directory and assuming they have shell commands in them. The rest-shell will execute these commands on startup. This makes it easy to set variables for commonly-used URIs or possibly set a `baseUri`.
191
+
192
+
echo "var set --name svcuri --value http://api.myservice.com/v1" > ~/.rest-shell/00-vars
INFO: Base URI set to 'http://api.myservice.com/v1'
199
+
200
+
___ ___ __ _____ __ _ _ _ _ __
201
+
| _ \ __/' _/_ _/' _/| || | / / | \ \
202
+
| v / _|`._`. | | `._`.| >< | / / / > >
203
+
|_|_\___|___/ |_| |___/|_||_| |_/_/ /_/
204
+
1.1.5.BUILD-SNAPSHOT
205
+
206
+
Welcome to the REST shell. For assistance hit TAB or type "help".
207
+
http://api.myservice.com/v1:>
208
+
209
+
### SSL Certificate Validation
210
+
211
+
If you generate a self-signed certificate for your server, by default the rest-shell will complain and refuse to connect. This is the default behavior of RestTemplate. To turn off certificate and hostname checking, use the `ssl validate --enabled false` command.
212
+
213
+
### HTTP Basic authentication
214
+
215
+
There is also a convenience command for setting an HTTP Basic authentication header. Use `auth basic --username user --pasword passwd` to set a username and password to base64 encode and place into the Authorization header that will be part of the current session's headers.
216
+
217
+
You can clear the authentication by using the `auth clear` command or by removing the Authorization header using the `headers clear` command.
218
+
188
219
### Commands
189
220
190
221
The rest-shell provides the following commands:
@@ -207,4 +238,5 @@ The rest-shell provides the following commands:
207
238
*`put` - HTTP PUT to the given path, passing JSON given in the `--data` parameter.
208
239
*`delete` - HTTP DELETE to the given path.
209
240
*`auth basic` - Set an HTTP Basic authentication token for use in this session.
210
-
*`ssl validate` - Disable certificate checking to work with self-signed certificates.
241
+
*`auth clear` - Clear the Authorization header currently in use.
242
+
*`ssl validate` - Disable certificate checking to work with self-signed certificates.
0 commit comments