使用Basic Authoirzation标头运行curl会引发以下错误。我试过给双引号和其他可能性,但我仍然得到同样的错误。不知道这里有什么问题
curl -k http://localhost:8080/api/session -H 'Authorization:Basic lkfnnlknvldfbvkjbfjkbkjbfdknbfdlknv==' -H Accept:application/json -X POST
curl: (22) The requested URL returned error: 400 Bad Request
curl: (6) Could not resolve host: lkfnnlknvldfbvkjbfjkbkjbfdknbfdlknv=='; Name or service not known
其他尝试:
curl -k http://localhost:8080/api/session -H 'Authorization:lkfnnlknvldfbvkjbfjkbkjbfdknbfdlknv==' -H Accept:application/json -X POST
curl: (22) The requested URL returned error: 400 Bad Request