How to update custom header for request restart
satishVekariya opened this issue · comments
Satish commented
ex: i attach access token "token_1" in initial request. if my stream is too long, some time stream is time out and rerequest to server, in between my token is change to "token_2", now how i can attach this new token to current stream and start request.
what i try is:
let config = FSStreamConfiguration()
config.predefinedHttpHeaderValues = ["access_token": "token_1"]
player = FSAudioStream(configuration: config)
player.play(url)
AccessToken refresh("token_2") event:
player.configuration.predefinedHttpHeaderValues = ["access_token": "token_2"]
result in rerequest is it take old token "token_1"