i'm working with Netty. I have a HttpObject and i need the content (HttpContent). A cast don't work. What can i do then?
Greetings Daniel
i'm working with Netty. I have a HttpObject and i need the content (HttpContent). A cast don't work. What can i do then?
Greetings Daniel
HttpObject has a few subinterfaces. Among them are HttpMessage and HttpContent. In general the HttpMessage represents the headers and the HttpContent represents the data. Depending on how your pipeline is configured you may get the following:
There are a few http examples provided by Netty to demonstrate how to handle an HttpObject. The https://github.com/netty/netty/tree/master/example/src/main/java/io/netty/example/http/upload example shows how to handle the second option described above.