Functions for defining HTTP routes.
Describe a URL when constructing a Route with the route function.
Use the Exact case when you want to provide a specific string to match against, for example, an absolute URL.
Use the Matching case when you want to provide a JavaScript-style regular expression to match against.
Define a route with the given method and url descriptor.
For example, this route describes any request with the
protocol http and the method PATCH:
Spec.Http.Route.route "PATCH" <|
Matching "http:\\/\\/.+"And this route describes any GET request to http://someplace.com/api with any value
for the query parameter key (and any additional query parameters):
Spec.Http.Route.route "GET" <|
Matching "http:\\/\\/someplace\\.com\\/api\\?key=.+"
Represents an HTTP route.