Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add definition of filter to Typhon README #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ It provides a number of conveniences and tries to promote safety wherever possib
* **Middleware "filters"**
Filters are decorators around `Service`s; in Typhon servers and clients share common functionality by composing it functionally.

Filters are something your request goes through before it's processed. They can handle both outgoing and incoming requests

An example is a service.ping which runs a Typhon filter to see if the request is for /ping. In which case, it responds with a pong rather than routing the request.

* **Body encoding and decoding**
Marshalling and unmarshalling request bodies to structs is such a common operation that our `Request` and `Response` objects support them directly. If the operations fail, the errors are propagated automatically since that's nearly always what a server will want.

Expand Down