-
Notifications
You must be signed in to change notification settings - Fork 97
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
♻️ Standardize the content-type header by using an enum value over typing it manually #474
The head ref may contain hidden characters: "\u267B\uFE0F-Standardize-the-content-type-header-by-using-an-enum-value-over-typing-it-manually"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats on making your first Pull Request and thanks for taking the time to improve Websurfx! ❤️!
Say hello by joining the conversation in our Discord
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks ❤️ for such a wonderful PR. We really appreciate it 👍 Keep it up!! But we would like to suggest one minor change before we merge this PR in. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks ❤️ again for working on this PR. Since everything looks good. We will merge this PR right away 🚀 🙂 .
…-using-an-enum-value-over-typing-it-manually
What does this PR do?
Refactoring the code to use the
actix-web
crate provided content-type headers for this in the router.rs file located in the src/server. Also, in the search.rs fileWhy is this change important?
This change is essential as it standardizes content-type headers instead of typing them manually, which can be prone to errors like unintentional addition of white spaces, etc.
Author's checklist
Related issues
Closes #466