Fork me on GitHub
#pedestal
<
2016-10-07
>
chrisetheridge09:10:15

am i being daft, or are there no guides on dynamically adding/removing interceptors to the chain in a route? the guides link to a 404

mtnygard13:10:55

@biscuitpants The docs are definitely still a work in progress. I’ve been adding guides when I can, and trying to add placeholders when I link to something that doesn’t exist yet.

chrisetheridge13:10:14

oh no i mean the docs on github 🙂 not the new docs!

mtnygard13:10:32

OK. Which link did you follow that was 404?

mtnygard13:10:55

Do you recall which page that link was on?

mtnygard13:10:06

Ah, I think I’ve found it. From the “service-interceptors.md” page, right?

mtnygard13:10:00

Thanks. I will fix that.

chrisetheridge13:10:29

thanks so much!

chrisetheridge13:10:16

ah thank you for the original link

mtnygard13:10:34

Yes, but it’s no longer a useful example of adding interceptors, because there are a couple levels of indirection still inside that interceptor.

chrisetheridge13:10:11

ah. is there another newer example?

mtnygard13:10:25

I’m digging up a link to the API you need for that.

chrisetheridge13:10:27

basically, we’d like to drop some interceptors on the route health-check

chrisetheridge13:10:31

perfect, thank you so much!

mtnygard13:10:56

Basically, you just call enqueue with the current context and the new interceptors you want to add to the stack

chrisetheridge13:10:21

okay great. seems simple enough. thank you for the help

si1415:10:33

interceptors are basically in every project that I like — pedestal, re-frame, Netty (they don't call 'em interceptors, but they are) :)