
package com.gyee.edge.gateway.restful.handler;


import com.gyee.edge.gateway.restful.dto.Response;
import com.gyee.edge.gateway.restful.annotation.NettyHttpHandler;
import com.gyee.edge.gateway.restful.http.NettyHttpRequest;

@NettyHttpHandler(path = "/request/body",method = "POST")
public class RequestBodyHandler implements IFunctionHandler<String> {
    @Override
    public Response<String> execute(NettyHttpRequest request) {
        /**
         * 可以在此拿到json转成业务需要的对象
         */
        String json = request.contentText();
        return Response.ok(json);
    }
}
