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
So far I have under HttpFiltersSourceAdapter added
@Override
public int getMaximumRequestBufferSizeInBytes() {
return 1048576;
}
I am able to System.out.println(httpObject.toString());
But when I try to cast the HttpObject to FullHttpResponse like this ((FullHttpResponse) httpObject).content(); I get an error like below
`Exception in thread "Thread-42" java.lang.ClassCastException: class io.netty.handler.codec.http.DefaultHttpResponse cannot be cast to class io.netty.handler.codec.http.FullHttpResponse (io.netty.handler.codec.http.DefaultHttpResponse and io.netty.handler.codec.http.FullHttpResponse are in module [email protected] of loader 'app')
at sample/sample.HttpResponseHandler.run(HttpResponseHandler.java:18)
at java.base/java.lang.Thread.run(Thread.java:832)
Exception in thread "Thread-43" Exception in thread "Thread-44" java.lang.ClassCastException: class io.netty.handler.codec.http.LastHttpContent$1 cannot be cast to class io.netty.handler.codec.http.FullHttpResponse (io.netty.handler.codec.http.LastHttpContent$1 and io.netty.handler.codec.http.FullHttpResponse are in module [email protected] of loader 'app')
at sample/sample.HttpResponseHandler.run(HttpResponseHandler.java:18)
at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.ClassCastException: class io.netty.handler.codec.http.DefaultHttpContent cannot be cast to class io.netty.handler.codec.http.FullHttpResponse (io.netty.handler.codec.http.DefaultHttpContent and io.netty.handler.codec.http.FullHttpResponse are in module [email protected] of loader 'app')
at sample/sample.HttpResponseHandler.run(HttpResponseHandler.java:18)
at java.base/java.lang.Thread.run(Thread.java:832)
Exception in thread "Thread-45" java.lang.ClassCastException: class io.netty.handler.codec.http.DefaultHttpResponse cannot be cast to class io.netty.handler.codec.http.FullHttpResponse (io.netty.handler.codec.http.DefaultHttpResponse and io.netty.handler.codec.http.FullHttpResponse are in module [email protected] of loader 'app')
at sample/sample.HttpResponseHandler.run(HttpResponseHandler.java:18)
at java.base/java.lang.Thread.run(Thread.java:832)
`
The text was updated successfully, but these errors were encountered:
Hi!
I am trying to get the http body of the response.
So far I have under
HttpFiltersSourceAdapter
addedI am able to
System.out.println(httpObject.toString());
But when I try to cast the
HttpObject
toFullHttpResponse
like this((FullHttpResponse) httpObject).content();
I get an error like below`Exception in thread "Thread-42" java.lang.ClassCastException: class io.netty.handler.codec.http.DefaultHttpResponse cannot be cast to class io.netty.handler.codec.http.FullHttpResponse (io.netty.handler.codec.http.DefaultHttpResponse and io.netty.handler.codec.http.FullHttpResponse are in module [email protected] of loader 'app')
at sample/sample.HttpResponseHandler.run(HttpResponseHandler.java:18)
at java.base/java.lang.Thread.run(Thread.java:832)
Exception in thread "Thread-43" Exception in thread "Thread-44" java.lang.ClassCastException: class io.netty.handler.codec.http.LastHttpContent$1 cannot be cast to class io.netty.handler.codec.http.FullHttpResponse (io.netty.handler.codec.http.LastHttpContent$1 and io.netty.handler.codec.http.FullHttpResponse are in module [email protected] of loader 'app')
at sample/sample.HttpResponseHandler.run(HttpResponseHandler.java:18)
at java.base/java.lang.Thread.run(Thread.java:832)
java.lang.ClassCastException: class io.netty.handler.codec.http.DefaultHttpContent cannot be cast to class io.netty.handler.codec.http.FullHttpResponse (io.netty.handler.codec.http.DefaultHttpContent and io.netty.handler.codec.http.FullHttpResponse are in module [email protected] of loader 'app')
at sample/sample.HttpResponseHandler.run(HttpResponseHandler.java:18)
at java.base/java.lang.Thread.run(Thread.java:832)
Exception in thread "Thread-45" java.lang.ClassCastException: class io.netty.handler.codec.http.DefaultHttpResponse cannot be cast to class io.netty.handler.codec.http.FullHttpResponse (io.netty.handler.codec.http.DefaultHttpResponse and io.netty.handler.codec.http.FullHttpResponse are in module [email protected] of loader 'app')
at sample/sample.HttpResponseHandler.run(HttpResponseHandler.java:18)
at java.base/java.lang.Thread.run(Thread.java:832)
`
The text was updated successfully, but these errors were encountered: