Record from an online audio stream

This is working fine:

using HTTP
HTTP.open("GET", "http://ais.absoluteradio.co.uk/absoluteclassicrock.mp3") do http
    n = Ref(0)
    r = startread(http)
    while !eof(http) && n[] < 1000
        bytes = read(http, 100)
        println("GET data: $bytes")
        n[]+=length(bytes)
    end
    @show n
end
2 Likes