<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorControlClient/getInfo(_:)-7ru8l",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A13ControlClientC7getInfoySSSgSSYaKF"
  },
  "title" : "getInfo(_:)"
}
-->

# getInfo(_:)

Convenience: issue `GETINFO` for a single key.

```
func getInfo(_ key: String) async throws -> String?
```

## Parameters

`key`

The single info key to query.

## Return Value

The value string, or `nil` when Tor returned no
entry for that key.

## Discussion

Composes [`getInfo(_:)`](/documentation/Tor/TorControlClient/getInfo(_:)-6m7om) with a single-element
array and looks up the key in the returned dictionary. Avoids
the array boilerplate at call sites that want just one value.

> Throws: Same errors as ``doc://Tor/documentation/Tor/TorControlClient/getInfo(_:)-6m7om``.