You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tweak these if we need each one to act just a little differently
Have methods support middleware (Possibly)
Improve flow based on above
Methods
The methods below have been implemented with basic functionality. I am unsure if much tweaking is needed for them to do anything "particular" at this point. However clean up is recommended as currently it is just the same function with different names, I also don't like how these are handled and written out. Should for sure revisit this soon.
CONNECT
DELETE
GET
HEAD
OPTIONS
PATCH
POST
PUT
TRACE
Description
The HTTP methods will be what kind of methods are allowed/able to be handled for a route They will come as functions that you will give your handler too, and then assigned to a route listener.
You can grab them from the methods module like so:
const{GET,POST}=require('octoris/modules')
You can use destructure to grab all of the methods you want/need
Usage
const{ route, static }=require('octoris/router'const{GET,POST}=require('octoris/methods')// Use them directly with the route arrayroute([static('about')],[GET(getHandler),POST(postHandler)])
The text was updated successfully, but these errors were encountered:
While they may be behaviorally the same, the second syntax reads much more clearly, as I know exactly what is in the array (functions!)
saving the function with its handler into a variable and then passing that in an array feels like a redundant step that also makes the code less readable
This is subject to change as the planning continues and grows
Related Issues
Tasks
Methods
The methods below have been implemented with basic functionality. I am unsure if much tweaking is needed for them to do anything "particular" at this point. However clean up is recommended as currently it is just the same function with different names, I also don't like how these are handled and written out. Should for sure revisit this soon.
Description
The HTTP methods will be what kind of methods are allowed/able to be handled for a route They will come as functions that you will give your handler too, and then assigned to a route listener.
You can grab them from the methods module like so:
You can use destructure to grab all of the methods you want/need
Usage
The text was updated successfully, but these errors were encountered: