How should I use hls?

Can I get an example of how to download media using HLS?
When I run this code, I receive code=200 response almost immediately, but the data is null.
After my code finishes running, I see the download continuing in the "View HTTP Traffic" window.
What is the correct way to download this type of media?