You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by "yanghao605 (via GitHub)" <gi...@apache.org> on 2023/05/15 07:42:46 UTC

[GitHub] [servicecomb-java-chassis] yanghao605 opened a new issue, #3789: 服务端的同一个operation是可以同时使用@RequestPart和@RequestBody的,消费端应该如何调用?

yanghao605 opened a new issue, #3789:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3789

   服务端接口定义如下:
   ```
       @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
       @ResponseBody
       public ResponseObject<ModelDataResponse> uploadModelFile(@RequestPart("file") MultipartFile file,
           @RequestBody ModelDataRequest dataRequest) {
           
       }
   ```


-- 
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.apache.org

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


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3789: 服务端的同一个operation是可以同时使用@RequestPart和@RequestBody的,消费端应该如何调用?

Posted by "liubao68 (via GitHub)" <gi...@apache.org>.
liubao68 commented on issue #3789:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3789#issuecomment-1557078218

   HTTP语义不清晰,建议不使用吧。 `RequestBody` 目前定义上指的是 json 格式的body, 也不支持 form 映射(form和java之间并没有标准映射协议)。 


-- 
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


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3789: 服务端的同一个operation是可以同时使用@RequestPart和@RequestBody的,消费端应该如何调用?

Posted by "liubao68 (via GitHub)" <gi...@apache.org>.
liubao68 commented on issue #3789:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3789#issuecomment-1551131401

   貌似这个定义方式不能工作才对。 只能有一个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: commits-unsubscribe@servicecomb.apache.org

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


[GitHub] [servicecomb-java-chassis] yanghao605 commented on issue #3789: 服务端的同一个operation是可以同时使用@RequestPart和@RequestBody的,消费端应该如何调用?

Posted by "yanghao605 (via GitHub)" <gi...@apache.org>.
yanghao605 commented on issue #3789:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3789#issuecomment-1557016654

   但是这种接口声明能够生成相应的swagger契约,按理来说应该是可以调用的吧


-- 
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


[GitHub] [servicecomb-java-chassis] yanghao605 closed issue #3789: 服务端的同一个operation是可以同时使用@RequestPart和@RequestBody的,消费端应该如何调用?

Posted by "yanghao605 (via GitHub)" <gi...@apache.org>.
yanghao605 closed issue #3789: 服务端的同一个operation是可以同时使用@RequestPart和@RequestBody的,消费端应该如何调用?
URL: https://github.com/apache/servicecomb-java-chassis/issues/3789


-- 
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