awaInitializeRequest static method
Future<AwaInitializeResponseResponse>
awaInitializeRequest(
- HttpClient client,
- AwaPermissionRequested body
Initialize a request to perform an advanced write action.
Implementation
static Future<AwaInitializeResponseResponse> awaInitializeRequest (
HttpClient client,
AwaPermissionRequested body
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final HttpClientConfig config = HttpClientConfig('POST', '/Destiny2/Awa/Initialize/', params);
config.body = await body.asyncToJson();
config.bodyContentType = 'application/json';
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return AwaInitializeResponseResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}