getChannelVariable static method
Implementation
static Future<dynamic> getChannelVariable(
String channelId, String variable) async {
// params: {
// 'endpoint':,
// 'extension':,
// 'context':,
// 'priority':,
// 'label':,
// 'app':,
// 'appArgs':,
// 'callerId':,
// 'timeout':,
// 'channelId':,
// 'otherChannelId':,
// 'originator':,
// 'formats': [].concat(formats).join(","),
// },
// data: { variables },
var uri = Uri(
scheme: "http",
userInfo: "",
host: "10.44.0.55",
port: 8088,
path: "ari/channels/${channelId}/variable",
//Iterable<String>? pathSegments,
query: "",
queryParameters: {'api_key': api_key, 'variable': variable}
//String? fragment
);
HttpClientRequest request = await client.getUrl(uri);
HttpClientResponse response = await request.close();
print(response);
final String stringData = await response.transform(utf8.decoder).join();
print(response.statusCode);
//print(stringData);
return (statusCode: response.statusCode, resp: stringData);
}