Is there a visual description of how the ktor clie...
# ktor
r
Is there a visual description of how the ktor client pipelines connect each other, to better know which pipeline I should intercept?
For example, I would like to know what happens if I add an interceptor to the
HttpRequestPipeline.Send
phase. Would my interceptor run before or after the
HttpSendPipeline
? I mean, I know I can find that information from reading the source, but is there a more comprehensive documentation on how all of that works together?
d
r
Yeah I read that, but I was wondering if I could do what I want without adding phases. I don’t know, I feel like adding a phase just to intercept it once is “overkill”.
d
Well I don't think you need your own phase. Just Intercept the
call pipeline phase
.
r
That still doesn’t tell me if such interceptor would be called before or after the pipeline
In the
HttpRequestPipeline
there’s this:``` /** * Phase for [HttpSend] feature */ val Send = PipelinePhase("Send")```
It doesn’t say how it works
d
Can't you just test it?
r
That would just be checking how it works right now, there’s no guarantee it’s not going to change.
As far as I understand, the move from
HttpRequestPipeline
to
HttpSendPipeline
is done with the
HttpSend
feature, which intercepts
HttpRequestPipeline.Send
.
If I add my own interceptor to
HttpRequestPipeline.Send
, I can’t know if it will be called before or after the one from
HttpSend
I think I’ll add phases.
👌 1