deleteOAuthClient method

Future<void> deleteOAuthClient(
  1. String projectId,
  2. String clientId
)

DELETE /accounts/projects/{project_id}/oauth/clients/{client_id} Returns 204 No Content on success.

Implementation

Future<void> deleteOAuthClient(String projectId, String clientId) async {
  final cid = Uri.encodeComponent(clientId);
  final uri = Uri.parse('$baseUrl/accounts/projects/$projectId/oauth/clients/$cid');

  final response = await http.delete(uri, headers: _getHeaders());

  if (response.statusCode >= 400) {
    throw MeshagentException(
      'Failed to delete OAuth client. '
      'Status code: ${response.statusCode}, body: ${response.body}',
    );
  }
}