Skip to content

routes.aug ​

HTTP benchmark · Source and specification

Files in this project

Code ​

aug
// aug-spec: "routes.aug.md" explains this file. Read it before changes; refresh with aug spec.
record Reply(int id, string message)
endpoint GET "/bench" as reply():
    return Reply(id=7, message="hello")
aug
// aug-spec: "routes.aug.md" explains this file. Read it before changes; refresh with aug spec.
record Reply(int id, string message)
endpoint GET "/bench" as reply() {
    return Reply(id=7, message="hello")
}

Compiled specification ​

Interactions and sequences

Plain handler results default to HTTP 200 unless another status is declared. HttpResponse values choose their own status. Unhandled request failures return HTTP 500 and cancel the request tasks.

Reply · immutable record · source ​

It takes id as an integer, kept read-only and message as a string, kept read-only.

reply · source ​

reply handles GET /bench. It returns a Reply with id 7 and message "hello". source

Checked interface
text
reply() returns Reply

Last updated:

The world runs on language