Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update custom header for request restart #452

Open
satishVekariya opened this issue Dec 11, 2019 · 0 comments
Open

How to update custom header for request restart #452

satishVekariya opened this issue Dec 11, 2019 · 0 comments

Comments

@satishVekariya
Copy link

satishVekariya commented Dec 11, 2019

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant