我正在尝试使用用户名和密码来验证 webhook 验证,但在标头值中没有出现。知道如何从请求标头中获取/读取它们吗?是否有任何不同的键名?我尝试了所有这些但总是空的
System.Net.Http.Headers.HttpRequestHeaders headers = Request.Headers;
string username = string.Empty;
string pwd = string.Empty;
string username1 = string.Empty;
string pwd1 = string.Empty;
if (headers.Contains("X-DocuSign-UserName"))
{
username1 = headers.GetValues("X-DocuSign-Password").First();
}
if (headers.Contains("X-DocuSign-Password"))
{
pwd1 = headers.GetValues("X-DocuSign-Password").First();
}
if (headers.Contains("username"))
{
username = headers.GetValues("username").First();
}
if (headers.Contains("password"))
{
pwd = headers.GetValues("password").First();
}