send method
Use this method to send custom HTTP requests to the screen
See UpnpCommon.httpClient.openUrl
Implementation
Future<HttpClientResponse> send(String method, String path,
{body, Map<String, dynamic>? headers}) async {
final request =
await UpnpCommon.httpClient.openUrl(method, baseUri.resolve(path));
if (body is String) {
request.write(body);
} else if (body is List<int>) {
request.add(body);
}
if (headers != null) {
for (String key in headers.keys) {
request.headers.set(key, headers[key] as Object);
}
}
return await request.close();
}