Django中未提供身份验证凭据

时间:2020-05-29 09:51:33

标签: python django django-rest-framework

headers = {

    "content-type": "application/json",
    "Authorization": "JWT " + token,
}

post_data = json.dumps({"content": "Some Random Content"})
posted_response = requests.post(ENDPOINT, data=post_data, headers=headers)
print(posted_response.text)

遇到此错误

{{1}}

权限和身份验证


    {"detail":"Authentication credentials were not provided."}

0 个答案:

没有答案