[WIP] Allow Router to handle additional HTTP verbs/methods #1234
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.
After a brief discussion in this Stackoverflow thread, I continued trying adding custom HTTP methods to the Phoenix Router.
While this option surely comes as a danger (using custom HTTP methods is generally not a favourable desire), it may be necessary to implement some protocols that extend HTTP with own method names, such as WebDAV/CalDAV.
Allowing the programmer to add custom HTTP methods turned out to be more difficult than I originally thought, because the method macros are being generated at phoenix's compile time, and not the application's. That made it impossible to either use
or
However, the current approach uses the projects config files and by adding this command adds any custom methods as desired by the programmer:
A short list of tasks that came up to my mind:
Please tell me what you think about this addition.