paint-brush
Intercept It: How to Implement Different Logic For Different Functionsby@anatolii
848 reads
848 reads

Intercept It: How to Implement Different Logic For Different Functions

by Anatolii Kabanov6mJune 8th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This article will be about the Interceptor design pattern and its usage via Ts.ED. In brief, the pattern injects some logical functionality before and/or after function execution. It has the same nature as the Middleware, but instead of working with a request pipeline, the interceptor handle function invocation and can repeat function execution with different parameters. Let’s assume the scenario where it could be helpful. I have a service that sends requests to some black box. And the black box is not so friendly and in case of exception very possible, there will be only an HTTP status code without any explanation.

Company Mentioned

Mention Thumbnail
featured image - Intercept It: How to Implement Different Logic For Different Functions
Anatolii Kabanov HackerNoon profile picture
Anatolii Kabanov

Anatolii Kabanov

@anatolii

Developing and enjoying life. Life is one, implement yours. All the best in your endeavors.

About @anatolii
LEARN MORE ABOUT @ANATOLII'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Anatolii Kabanov HackerNoon profile picture
Anatolii Kabanov@anatolii
Developing and enjoying life. Life is one, implement yours. All the best in your endeavors.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Bit
Allella
Newsbreak
Nitter
Platypush
Tefter
Asorrybowl
Leftic
Trendradars
Artist
Nutter
Stemy
Winscloud
Privacyplz
Ztn
Nullob
Koyu
Tokhmi