Matrix 矩阵vnext vCard请求
获取花名册后,我想发送一条IQ get消息以获取vCard。 如何使用矩阵vnext发送具有所需值的XMPP/XML数据包? 数据包详细信息示例: IQ[ID='123'type='get'to='ID'foo@10.10.10.11']Matrix 矩阵vnext vCard请求,matrix,xmpp,vnext,Matrix,Xmpp,Vnext,获取花名册后,我想发送一条IQ get消息以获取vCard。 如何使用矩阵vnext发送具有所需值的XMPP/XML数据包? 数据包详细信息示例: IQ[ID='123'type='get'to='ID'foo@10.10.10.11'] VCard[xmlns='VCard-temp']这里的文档中描述了这一点: 以下文档对此进行了描述: // construct the iq query var vcardRequest = new VcardIq { Type = IqType.Get
VCard[xmlns='VCard-temp']这里的文档中描述了这一点:
以下文档对此进行了描述:
// construct the iq query
var vcardRequest = new VcardIq { Type = IqType.Get, To = "bob@example.com" };
// send the request and await the resposne
var resultIq = await xmppClient.SendIqAsync(vcardRequest);
// check for success or failure
if (resultIq.Type == IqType.Result)
{
// server returned a result (sucsess)
// => process the vCard here
}
else if (resultIq.Type == IqType.Error)
{
// server returned an error
// => handle error
}