package com.jpsoft.shinestar.lapi;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.handler.codec.http.HttpContent;
import io.netty.handler.codec.http.HttpResponse;

public class HttpClientDealing extends ChannelInboundHandlerAdapter {
    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        if(msg instanceof HttpResponse){
            System.out.println(msg.toString());//打印服务器返回的httpResponse
        }

        if(msg instanceof HttpContent) {
            System.out.println(msg.toString());
        }
    }
}
