modifyDatabaseConnection method
Implementation
Future<http.Response> modifyDatabaseConnection({
required String databaseName,
required String dbName,
required String host,
required String password,
required String port,
required String username,
}) async {
final url = Uri.parse('$baseUrl/modifyDatabaseConnection?workspaceId=$workspaceId&databaseName=$databaseName&is_encrypt=true');
final headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer $token',
};
final body = jsonEncode({
"database_attributes": {
"dbName": dbName,
"host": host,
"password": password,
"port": port,
"username": username
}
});
return await http.patch(url, headers: headers, body: body);
}