# requestVCard method

Future <Result<VCardError, VCard>> requestVCard(

1. JID jid

)

## Implementation

    Future<Result<VCardError, VCard>> requestVCard(JID jid) async {
      final result = (await getAttributes().sendStanza(
        StanzaDetails(
          Stanza.iq(
            to: jid.toString(),
            type: 'get',
            children: [
              XMLNode.xmlns(
                tag: 'vCard',
                xmlns: vCardTempXmlns,
              ),
            ],
          ),
          encrypted: true,
        ),
      ))!;

      if (result.attributes['type'] != 'result') {
        return Result(UnknownVCardError());
      }
      final vcard = result.firstTag('vCard', xmlns: vCardTempXmlns);
      if (vcard == null) {
        return Result(UnknownVCardError());
      }

      return Result(_parseVCard(vcard));
    }