Add example script for service that returns tasks of a bound user
FEA: ItEr77S14BoundUsersWebServices
This commit is contained in:
parent
5ebffa666b
commit
cc87e7323a
1 changed files with 31 additions and 0 deletions
31
scripts/rest-clients/bound-user-my-tasks.sh
Executable file
31
scripts/rest-clients/bound-user-my-tasks.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./rest-common-env.sh
|
||||
|
||||
printf "BOUND USER\n"
|
||||
printf "Username: "
|
||||
read loginName
|
||||
printf "Password: "
|
||||
read password
|
||||
|
||||
if [ "$1" = "--prod" ]; then
|
||||
baseServiceURL=$PRODUCTION_BASE_SERVICE_URL
|
||||
certificate=$PRODUCTION_CERTIFICATE
|
||||
elif [ "$1" = "--dev" ]; then
|
||||
baseServiceURL=$DEVELOPMENT_BASE_SERVICE_URL
|
||||
certificate=$DEVELOPMENT_CERTIFICATE
|
||||
else
|
||||
baseServiceURL=$DEMO_BASE_SERVICE_URL
|
||||
certificate=$DEMO_CERTIFICATE
|
||||
fi
|
||||
|
||||
authorization=`echo -n "$loginName:$password" | base64`
|
||||
|
||||
result=`curl -sv -X GET $certificate --header "Authorization: Basic $authorization" \
|
||||
$baseServiceURL/bounduser/mytasks`
|
||||
|
||||
if hash tidy &> /dev/null; then
|
||||
echo $result | tidy -xml -i -q -utf8
|
||||
else
|
||||
echo $result
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue