forked from yokawasa/azure-functions-python-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
t.sh
executable file
·36 lines (28 loc) · 899 Bytes
/
t.sh
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
#!/bin/sh
api_url="AZURE_FUNCTION_ENDPOINT: ex. https://<app_account>.azurewebsites.net/api/<func_name>"
api_key="AZURE_FUNCTION_KEY: ex. aRVQ7Lj0vzDhY0JBYF8gpxYyEBxLwhO51JSC7X5dZFbTvROs7xNg=="
echo "Sending Bad Request #1: Invalid HTTP Method............."
curl -s\
-H "Content-Type: application/json; charset=UTF-8"\
-H "x-functions-key: ${api_key}"\
-XGET ${api_url}
echo ""
echo "Sending Bad Request #1: Invalid Request Body............."
curl -s\
-H "Content-Type: application/json; charset=UTF-8"\
-H "x-functions-key: ${api_key}"\
-XPOST ${api_url} -d'{
"permission": "rl"
}'
echo ""
echo "Sending Bad Request #3: Invalid TTL............."
curl -s\
-H "Content-Type: application/json; charset=UTF-8"\
-H "x-functions-key: ${api_key}"\
-XPOST ${api_url} -d'{
"permission": "rl",
"container": "functiontest",
"blobname": "sample.png",
"ttl": -1
}'
echo ""