Closed planework closed 3 months ago
Hey thank you for the suggestion, I guess my only question is I'm not sure where this is coming from nor what it's meant to replace? Do you have a use case using Flight where you ran into problems and why this solves that problem?
Hey thank you for the suggestion, I guess my only question is I'm not sure where this is coming from nor what it's meant to replace? Do you have a use case using Flight where you ran into problems and why this solves that problem?
No, just offering some suggestions. This is inspired by the usage in other frameworks, and it's a piece of code written using ChatGPT. I found it quite good, so I'm sharing it unconditionally.
Looking this over, I see the intention, but half of it is already solved in Flights implementation, and the sanitizing bit I feel should be an intentional decision by the end coder. When the framework starts manipulating the incoming data it causes confusion and endless bug tracing to figure out what's really happening. There is another repo with sanitizing functionality that could be incorporated into flight https://github.com/Lawrence72/sanitizer
Sure! Here's the GitHub pull request with the complete code including comments in English:
Title: Proposal: Addition of IO function for versatile input/output handling
Description: This pull request proposes the incorporation of an
IO
function to facilitate flexible input/output operations within the project. TheIO
function simplifies data retrieval and sanitization from various sources, including GET, POST, JSON, cookies, files, and the request superglobal.Changes:
IO
function to manage input/output operations efficiently.filter_var
function to enhance security.Code:
Usage:
Testing:
IO
function to ensure accurate behavior across various input scenarios.Notes:
Related Issue: [Link to any related issue or discussion if applicable]
Please review the proposed changes and consider integrating them into the project. If you have any feedback or questions, feel free to share them. Thank you for your attention to this enhancement proposal!