Open kamilkloch opened 1 month ago
I'm having some problems trying to reproduce the issue. See my attempt here: https://github.com/softwaremill/tapir/pull/3965/files
Initially I was using HttpClientFs2Backend
, and this was indeed failing, because there's no way to obtain response headers in case of web sockets when using Java's HttpClient
(at least I can't find a way; see also https://github.com/softwaremill/sttp/pull/2245)
However, with AsyncHttpClientFs2Backend
, the test passes.
Could you perhaps take a stab at https://github.com/kamilkloch/tapir-correlation-id? I am aware the code is mode convoluted, but I think it shows that the header is gone.
Maybe in September. Ideally I'd need a minimized test case, or a really minimized app :)
Would you like me to minimize it more? Deal? ;)
Well if you could minimize it - of course, please do - though both me & @kciesielski are unavailable in August, sorry :)
That is great to hear, very well deservered unplugged time for both of you. Will try to minimize.
We are using tapir interceptor to enrich server responses with some contextual information (e.g. correlation id):
On the client side, we wrap tapir interpreter to extract correlation id from the response header and lift the original
to
In case of rest calls the wrapped tapir client properly extracts correlation id from the response.
In case of websockets, correlation id header is missing - the underlying
SttpClientInterpreter
returns a response without the header. A low-level sttp websocket client does receive the correlation id:Repo with the code: https://github.com/kamilkloch/tapir-correlation-id