当我尝试执行下面的脚本时,我得到403 Forbidden
以下是我的剧本
#!/bin/bash
user="user5"
pass="password5"
email="user5@user.com"
user_data()
{
cat <<EOF
{
"name":"$user",
"email":"$email",
"login":"$user",
"password":"$pass"
}
EOF
}
curl -i \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-X POST http://admin:admin@10.10.34.5:32456/api/admin/users
我收到以下错误
HTTP/1.1 403 Forbidden
Content-Type: application/json; charset=UTF-8
Set-Cookie: grafana_sess=f65cc6d3c6d; Path=/; HttpOnly
Date: Mon, 17 Jul 2017 07:53:12 GMT
Content-Length: 31
为什么我收到此错误?