Author Topic: Is it possible to set custom http header for BASS_StreamCreateURL?  (Read 135 times)

Alias

  • Guest
Hi Ian!

Is it possible to set a custom http header for BASS_StreamCreateURL?

My music server requires a custom auth token from the client sent via http header. Is ist possible to set it when i use BASS_StreamCreateURL to stream a file?

Thank you! :)

Ian @ un4seen

  • Administrator
  • Posts: 20437
Yes, that is possible, but it's a bit fiddly. The headers should follow the URL, separated by a carriage return and line feed ("\r\n"). Here's the example from the BASS_StreamCreateURL documentation:

Code: [Select]
HSTREAM stream=BASS_StreamCreateURL("http://www.asite.com/afile.mp3\r\nCookie: mycookie=blah\r\n", 0, 0, NULL, 0);