Netty httpリクエストの送信
1110 ワード
Nettyはhttpリクエストを送信し,リクエストと応答を符号化処理する必要がある.
転載先:https://www.cnblogs.com/chenhao0302/p/9071957.html
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