awaGetActionToken static method
Returns the action token if user approves the request.
Implementation
static Future<AwaAuthorizationResultResponse> awaGetActionToken (
HttpClient client,
String correlationId,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _correlationId = '$correlationId';
final HttpClientConfig config = HttpClientConfig('GET', '/Destiny2/Awa/GetActionToken/$_correlationId/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return AwaAuthorizationResultResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}