Interface HTTPRouter
An interface for HTTP request routers.
Inherits from
Properties
Name | Type | Description |
---|---|---|
prefix
[get]
|
string |
Methods
Name | Description |
---|---|
any
|
Adds a new route for requests matching the specified pattern, regardless of their HTTP verb. |
delete_
|
Adds a new route for DELETE requests matching the specified pattern. |
get
|
Adds a new route for GET requests matching the specified pattern. |
handleRequest
|
Handles the HTTP request by dispatching it to the registered request handlers. |
match
|
Adds a new route for request that match the path and method
|
patch
|
Adds a new route for PATCH requests matching the specified pattern. |
post
|
Adds a new route for POST requests matching the specified pattern. |
put
|
Adds a new route for PUT requests matching the specified pattern. |
Removal notice
Note that this is planned to be removed, due to interface/behavior considerations.
In particular, the exact behavior of the router (most importantly, the route match
string format) must be considered part of the interface. However, this removes the
prime argument for having an interface in the first place.
Authors
Sönke Ludwig
Copyright
© 2012-2014 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.