apache / apisix-java-plugin-runner

APISIX Plugin Runner in Java
https://apisix.apache.org/
Apache License 2.0
128 stars 95 forks source link

bug: HttpRequest.getBody()为空 #236

Open ly164608001 opened 1 year ago

ly164608001 commented 1 year ago

Issue description

自定义过滤器实现PluginFilter接口后,在filter方法中通过HttpRequest.getBody()为空

Guanyong-Liang commented 10 months ago

同问,完全不知道是什么原因,解决也不知道怎么解决

gaoxingliang commented 9 months ago

@Guanyong-Liang @ly164608001 加上:

    /**
     * If you need to fetch request body in the current plugin, you will need to return true in this function.
     */
    @Override
    public Boolean requiredBody() {
        return true;
    }