We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8deb13d commit a20a82cCopy full SHA for a20a82c
examples/client_bash_auth.sh
@@ -1,7 +1,10 @@
1
#!/bin/bash
2
3
+# initialize cookie store
4
+cp /dev/null cookies.txt
5
+
6
# login and store cookies in 'cookies.txt' AND retrieve the value of the XSRF token
-TOKEN=`curl 'http://localhost/api.php/' --data "username=admin&password=admin" --cookie-jar cookies.txt`
7
+TOKEN=`curl 'http://localhost/api.php/' --data "username=admin&password=admin" --cookie-jar cookies.txt --silent`
8
9
# strip the double quotes from the variable (JSON decode)
10
TOKEN=${TOKEN//\"/}
0 commit comments