O'Reilly logo

Go Web Development Cookbook by Arpit Aggarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating your first filter

Sometimes, we may want to perform logic either before an action method is called or after an action method runs. In that case, we use filters, which we will be covering in this recipe.

Filters are basically handlers which encapsulate the common functionality or the cross-cutting concern. We just define them once and then apply them to the different controllers and action methods.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required