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

Content for the "What is an Interceptor?" guide needs to be written #48

Open
8 tasks done
mtnygard opened this issue Dec 20, 2016 · 3 comments
Open
8 tasks done
Assignees

Comments

@mtnygard
Copy link
Contributor

mtnygard commented Dec 20, 2016

Topics to cover:

  • Basic structure of :enter, :leave, and :error functions
  • Creating an interceptor from a map
  • Interceptors as values (i.e., def with a map)
  • Interceptors constructed in functions (closing over state)
  • The IntoInterceptor protocol (use a defrecord for an example)
  • Async return from an interceptor
  • Streaming response bodies
  • Distinction between interceptors as a general technique vs. the HTTP handling interceptors in Pedestal
@mtnygard mtnygard changed the title Content for "What is an Interceptor?" guide needs to be written Content for the "What is an Interceptor?" guide needs to be written Dec 20, 2016
@luskwater
Copy link
Contributor

I've fixed a couple of typos that I'll post a PR for if you like, but I'm not sure your intent with this paragraph (first sentence or so, really).

This is where we have to start being precise about the difference between an interceptor how it gets invoked. "Interceptor" is a very general concept.

Do you intend, ...the difference between an interceptor and middleware..., or ...start being precise about how an interceptor gets invoked. I feel like this is a placeholder for more explanation.

@mtnygard
Copy link
Contributor Author

mtnygard commented Nov 8, 2017

I’d be delighted to see a PR.

For that paragraph, the intent is to distinguish Interceptors as a general model for use in other, non-web, contexts versus the way that servlet-interceptor uses them.

It’s significant because the behavior of stopping once a response is attached is specific to the servlet-interceptor’s chain. Likewise, the notion of a handler function being treated automatically as an interceptor is very specific to web requests.

@hlship hlship self-assigned this Dec 2, 2022
@hlship
Copy link
Contributor

hlship commented Dec 2, 2022

Not all of this will go into "What is an Interceptor?" which is more of a beginner's introduction, but I've verified that all the bullet-items in the list are present there or in the reference pages (or both).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants