Route Methods
TypePath provides the following route methods:
import {
get,
post,
put,
patch,
delete as del,
options,
head,
any
} from "typepath";
Catchall method
const r = router({
"/": any((ctx) => ctx.request.method)
});
Multiple methods on the same route
const r = router({
"/user/:id": [get((ctx) => ctx.params.id), post((ctx) => ctx.params.id)],
});