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

added functions for setting ApiKey and Authorization Headers #41

Merged
merged 3 commits into from Dec 18, 2023

Conversation

whoiscarlo
Copy link
Contributor

What kind of change does this PR introduce?

I removed the function TokenAuth, with SetApiKey and SetAuthToken, so that users can change the apiKey and authorization headers individually.

What is the current behavior?

Currently TokenAuth sets the apiKey and authorization header

What is the new behavior?

postgres.SetAuthToken( authToken string) will set the authorization header for subsequent request and
postgres.SetApiKey( apiKey string) will set the apiKey header for subsequent request

I removed the function TokenAuth, with SetApiKey and SetAuthToken, so that users can change the apiKey and authorization headers separately.
Copy link
Contributor

@Carnageous Carnageous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Maybe consider updating documentation on this to make it clear to users that they might need to set both Headers.

I'm not sure how the version variable should be used, but following semantic versioning, I'd argue that this would be a minor version increase, so 0.1.0?

In any case, I'd like to see this being merged!

@whoiscarlo
Copy link
Contributor Author

Looks good to me!

Maybe consider updating documentation on this to make it clear to users that they might need to set both Headers.

I'm not sure how the version variable should be used, but following semantic versioning, I'd argue that this would be a minor version increase, so 0.1.0?

In any case, I'd like to see this being merged!

@Carnageous yup you got it

@muratmirgun muratmirgun merged commit 17634ba into supabase-community:main Dec 18, 2023
1 check passed
@muratmirgun
Copy link
Member

Thanks for Contribution 🚀

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.

None yet

3 participants