Skip to content

feat: add support for default request headers#507

Open
phts wants to merge 1 commit intothelinmichael:masterfrom
phts:default-request-headers
Open

feat: add support for default request headers#507
phts wants to merge 1 commit intothelinmichael:masterfrom
phts:default-request-headers

Conversation

@phts
Copy link

@phts phts commented Sep 2, 2024

Solution for #506 - possibility to set default headers for all API requests, e.g Accept-Language

const api = new SpotifyWebApi();
api.setDefaultHeaders({'Accept-Language': 'ru'});

So it will correctly fetch artists names, written in their native language. For example:

Before: After:
Screen Shot 2024-09-02 at 23 15 04 Screen Shot 2024-09-02 at 23 07 35

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

Successfully merging this pull request may close these issues.

1 participant