| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
`foom` is now the web framework, so the code from mooh.go has been moved
to that repository.
The response and request are handled by the new `web-request` project,
and so the code has been moved to this repository.
|
| |
|
|
|
|
|
|
| |
Parameters can come from the URL, but also the query string or the
body. For now we create a function ParamRoute to be explicit about
which param we want.
|
|
|
|
|
| |
Some logic will be needed to create this object, it's easier to do that
with a constructor.
|
|
|
|
|
|
|
|
| |
Forward the http.Request object to the Dispatcher's Match function, and
instead of returning the route that match, return the whole Match
object.
We create our own Request object later in the process.
|
|
For now the framework provide a "dispatcher" and a mechanism to add
routes. The type "route" provide a constructor so some logic can be
applied before creating the type.
The way the dispatcher works for now is very stupid: it looks for all
the registered routes, and check if it's the right HTTP method and if
the patch matches.
The next step is to deal with place holder in the path.
|