tumtumtum / StreamingKit

A fast and extensible gapless AudioPlayer/AudioStreamer for OSX and iOS (iPhone, iPad)
Other
2.41k stars 526 forks source link

Support adding custom HTTP headers to the request #161

Open mmcdole opened 9 years ago

mmcdole commented 9 years ago

I'd like to be able to stream music from sources that require custom HTTP authorization headers. It would be really great if StreamingKit would expose an overload that would let me a supply a URL and a dictionary of key/value pairs to be used as HTTP headers in the request StreamingKit makes.

You would then be able to stream media that requires OAuth for example.

sadhiappan commented 9 years ago

This would be a great add on. +1

flagoworld commented 9 years ago

In the mean time, It's really easy to do with an NSURLProtocol subclass. You can intercept the request and set the headers.

syrakozz commented 9 years ago

+1

lightninglu10 commented 7 years ago

@flagoworld hey flago, can you expand on this and give an explanation of how this is done?