1.5 KiB
1.5 KiB
markup, title, description, import
| markup | title | description | import | ||||
|---|---|---|---|---|---|---|---|
| occlusion | ext/web/route | Declared Endpoint / Document route registration (ADR 0007). |
|
route
+ `app`
+ `path`
+ `method`="GET"
+ `page`=None
+ `fn`=""
+ `request`="json"
+ `response`="json"
+ `auth`=""
Declared route handle. Prefer web.route / Artifact type: endpoint discovery via web.serve.
cap.load
out=
| _type | app | path | method | page | fn | request | response | auth |
|---|---|---|---|---|---|---|---|---|
| route | app |
path |
method |
page |
fn |
request |
response |
auth |
out
use
+ `middleware`
Attach middleware table to this route (|header|value| or named capability rows).
cap.load > web_route_use route=
selfmiddleware=middleware
register
+ `app`=None
Register this declared route on an app handle.
cap.load a = app
a== None a = app)-
pagepath = path) > web_app_route app=apath=pathpage=pagefnpath = path) method = method) request = request) response = response) > web_app_invoke app=apath=pathmethod=methodfn=fnbody=requestreturn=response-
> table.put in=None at="ok" value=False