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

Replace http method strings with net/http constants #14677

Merged
merged 10 commits into from
Mar 24, 2022
Merged

Conversation

averche
Copy link
Contributor

@averche averche commented Mar 23, 2022

This is a quick refactoring PR to follow up #14388 where @VinnyHC pointed out that we were using hard-coded strings instead of net/http string constants.

@averche averche requested a review from a team March 23, 2022 22:07
@digivava
Copy link
Collaborator

Yay! I confirmed that GET, POST, PUT, PATCH, and DELETE don't have any more hard-coded strings, but it looks like "LIST" is still hard-coded.

@vercel vercel bot temporarily deployed to Preview – vault-storybook March 23, 2022 22:17 Inactive
@vercel vercel bot temporarily deployed to Preview – vault March 23, 2022 22:17 Inactive
@averche
Copy link
Contributor Author

averche commented Mar 23, 2022

Good catch!

@vercel vercel bot temporarily deployed to Preview – vault March 24, 2022 15:06 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook March 24, 2022 15:06 Inactive
@averche
Copy link
Contributor Author

averche commented Mar 24, 2022

It appears that LIST is not one of the standard http methods and it does not have a corresponding constant in net/http.

@vercel vercel bot temporarily deployed to Preview – vault-storybook March 24, 2022 17:18 Inactive
@averche averche merged commit 0dd4cda into main Mar 24, 2022
@averche averche deleted the averche/http-constants branch March 24, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants