You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/12/16 07:10:35 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2665: 对于 @RequestBody 的 疑问 ,可能需要更新文档

liubao68 commented on issue #2665:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2665#issuecomment-1354310271

   目前 Java Chassis 支持如下用法:
   
   (1)接口定义使用 application/json
   
   ```
     @RequestMapping(path = "/saysomething", method = RequestMethod.POST)
     public String saySomething(String prefix, @RequestBody Person user) {
       return prefix + " " + user.getName();
     }
   ```
   
   (2)客户端请求支持 application/x-www-form-urlencoded 
   
   ```
   name=zhangshan&age=20
   ```
   


-- 
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: commits-unsubscribe@servicecomb.apache.org

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