Improve type safety of request methods#411
Closed
willmmiles wants to merge 5 commits into
Closed
Conversation
- Requests can be only one method - String operations are free functions - Function for matching composites
Fix HTTP_ANY macro conflict with Arduino core. Rename the combination value to HTTP_ALL and make it type-safe as a WebRequestMethodComposite. Ensure a warning is generated when conflicts are detected, and add a deprecation alert to our compatibility HTTP_ANY value. Co-authored-by: GitHub Copilot <copilot@github.com> Co-authored-by: mathieucarbou <61346+mathieucarbou@users.noreply.github.com>
Author
|
Moving branch to local repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some cleanup and formalization of the
WebRequestMethodCompositetype, with explicit functions for matching methods, and cleanup of the definition values. Includes code adapted from #403 to switch fromHTTP_ANY(which conflicts with other web server libraries) toAsyncWebRequestMethod::HTTP_ALL, with appropriate warnings when conflicts are possible.Should fix #402.