我在苦苦挣扎here:
- 将编码的base64凭据发送到身份验证服务器。
- 获取包含用于身份验证的UUID的响应。
- 使用UUID验证REST请求。
以该请求为例:
**Header**
“`json
{
‘Content-Type’: ‘application/x-www-form-urlencoded’,‘authorization’: ‘Basic <base64 encoded username:password>’
}
“`
**Body**
“`json
{
‘grant_type’: ‘client_credentials’
}
“`
我如何变成一个request.post()?