netty 发送 http请求
生活随笔
收集整理的這篇文章主要介紹了
netty 发送 http请求
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
netty發(fā)送http請求,需要對請求和響應(yīng)做編碼處理
?
protected void initChannel(SocketChannel socketChannel) throws Exception {socketChannel.pipeline().addLast(new HttpRequestEncoder());//對發(fā)送的httpRequest進行編碼socketChannel.pipeline().addLast(new HttpResponseDecoder());//對返回的httpresopnse解碼// socketChannel.pipeline().addLast(new HttpClientCodec());//即對發(fā)送的httpRequest進行編碼,也對返回的httpresopnse解碼 }?
轉(zhuǎn)載于:https://www.cnblogs.com/chenhao0302/p/9071957.html
總結(jié)
以上是生活随笔為你收集整理的netty 发送 http请求的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DevOps - 配置管理 - Ansi
- 下一篇: Identity Server4学习系列