You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that SSE doesn't work with HttpLoggingInterceptor that have Level.BODY. Interceptor with other levels are working as expected.
HttpLoggingInterceptor with Level.BODY is not allowing RealEventSource to read response body byte by byte. It looks like interceptor is trying to buffer the entire response body which is not ready until request is done. Therefore Callback.onResponse in RealEventSource doesn't called, response events can't be parsed and passed to EventSourceListener.
The solution could be ignoring response body in HttpLoggingInterceptor for Content-Type: text/event-stream, reading response body line by line or just an explicit warning of not using Level.BODY with SEE in documentation.
Changing log level from Level.BODY for SSE client wouldn't be the best solution because it will also disable logging a body for regular HTTP requests for this client instance.
The text was updated successfully, but these errors were encountered:
The problem is that SSE doesn't work with HttpLoggingInterceptor that have Level.BODY. Interceptor with other levels are working as expected.
HttpLoggingInterceptor with Level.BODY is not allowing RealEventSource to read response body byte by byte. It looks like interceptor is trying to buffer the entire response body which is not ready until request is done. Therefore Callback.onResponse in RealEventSource doesn't called, response events can't be parsed and passed to EventSourceListener.
The solution could be ignoring response body in HttpLoggingInterceptor for
Content-Type: text/event-stream
, reading response body line by line or just an explicit warning of not using Level.BODY with SEE in documentation.Changing log level from Level.BODY for SSE client wouldn't be the best solution because it will also disable logging a body for regular HTTP requests for this client instance.
The text was updated successfully, but these errors were encountered: