You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/11 04:15:19 UTC

[GitHub] [apisix-java-plugin-runner] langligelang opened a new issue, #143: bug: setBody not work

langligelang opened a new issue, #143:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/143

   ### Issue description
   setBody not work
   ### Environment
   
   * your apisix-java-plugin-runner version
   0.2.0
   ### Minimal test code / Steps to reproduce the issue
   
   1.  I want to set  Request Body like  request.setBody("h=xxxxxx") or request.setBody("{"hello":"23f"}")
   2. But the real server still get the orginal request body.
   我想通过setBody设置request body。但是不ok。获取得到的还是原先的request  body。
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   Get the orginal content
   ### What's the expected result?
   Get the setBody content


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #143: bug: setBody not work

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #143:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/143#issuecomment-1127353544

   > We meet the same problem, although there is request.setBody() method, but it do not actually work.
   > 
   > In the document, [https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#write-filter](url), the rewrite request is also not mention rewrite body.
   
   my mistake, I misread the title.
   
   `setBody` is not currently supported, so it is not written in the documentation.
   
   The `setBody` you see is not for the user, just like some other functions.
   
   But it's a good problem, and in the later refactorings it needs to be marked clearly which functions are open to the user.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-java-plugin-runner] tzssangglass closed issue #143: bug: setBody not work

Posted by GitBox <gi...@apache.org>.
tzssangglass closed issue #143: bug: setBody not work
URL: https://github.com/apache/apisix-java-plugin-runner/issues/143


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-java-plugin-runner] DALKLUNA commented on issue #143: bug: setBody not work

Posted by GitBox <gi...@apache.org>.
DALKLUNA commented on issue #143:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/143#issuecomment-1127293273

   > (
   
   We meet the same problem, although there is request.setBody() method, but it do not actually work.
   
   In the document, [https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#write-filter](url), the rewrite request is also not mention rewrite body.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #143: bug: setBody not work

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #143:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/143#issuecomment-1124444264

   > Get the orginal content
   
   see: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#write-filter
   
   ```
     @Override
     public Boolean requiredBody() {
         return true;
     }
   
   ```
   
   and use
   
   ```
   String body = request.getBody();
   ```
   
   in your custom filter.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org