You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "Yang Bo (JIRA)" <ji...@apache.org> on 2018/05/16 08:51:00 UTC

[jira] [Commented] (SCB-75) Why it must be json format when receiving bytes through @RequestBody byte[] buffer

    [ https://issues.apache.org/jira/browse/SCB-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16477085#comment-16477085 ] 

Yang Bo commented on SCB-75:
----------------------------

Could you please add more information close this issue?

> Why it must be json format when receiving bytes through @RequestBody byte[] buffer
> ----------------------------------------------------------------------------------
>
>                 Key: SCB-75
>                 URL: https://issues.apache.org/jira/browse/SCB-75
>             Project: Apache ServiceComb
>          Issue Type: Bug
>            Reporter: Bo Li
>            Priority: Major
>
> Parameter invalid error occurs when received data is not json format when using @requestbody byte[] buffer
> {code}
> @RequestMapping(value = "/update", method = RequestMethod.PUT)
>     public ResponseEntity<String> update(@PathVariable("accountId") Long accountId,
>           @RequestHeader("Date") String date,
>          @RequestBody byte[] buffer, HttpServletRequest request)
>     {
>            byte[] data = buffer;   //buffer data have to be json format here
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)