im trying to get icecast metadata with dart on the server side of things.
i have an object with a method to retrive the metadata.
to get the metadata i need to send a HttpRequest to the icecast server with a special header. If its a propper icecast server, i should get a response header with the key/value pair "icy-metaint", "offset"
my dart code so far.
HttpClient client = new HttpClient();
print(Uri.parse(this.src));
client.getUrl(Uri.parse(this.src))
.then((HttpClientRequest request) {
request.headers.add(HttpHeaders.USER_AGENT, "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36");
request.headers.add("Icy-MetaData", "1");
})
.then((HttpClientResponse response) {
});
but now i dont know how to actually send the request or if its even the right approach.
Any help would be greatly appreciated.