Key method

Future<KeyResponse> Key(
  1. KeyRequest input, {
  2. Map<String, String> headers = const {},
})

Implementation

Future<KeyResponse> Key(KeyRequest input, {Map<String,String> headers = const {}}) async {
	var response = await $http.post(this.server.replace(path: "/protocol.auth.v1.AuthService/Key"), body: input.writeToBuffer(), headers: {"content-type": "application/hrpc"}..addAll(headers)..addAll(this.commonHeaders));
	if (response.statusCode != 200) { throw response; }
	return KeyResponse.fromBuffer(response.bodyBytes);
}