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