You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//from http.jsif(req.responseType==='json'&&typeofbody==='string'){// Save the original body, before attempting XSSI prefix stripping.varoriginalBody=body;body=body.replace(XSSI_PREFIX,'');try{// Attempt the parse. If it fails, a parse error should be delivered to the user.body=body!=='' ? JSON.parse(body) : null;}
....)
While the straight forward work-around is to return StringWrapper object as json media-type:
Right, this seems like a reasonable enhancement. I think supporting just text/plain is a good start with obvious implementation, but this could even be enhanced to support other types in the future (probably that would mean that you'd need to register a custom deserializer on the client).
Hello
We have Spring MVC RestEndpoint that returns
ResponseEntity<String>
:When invoking the http request , the
reponseType
option is not passed:and defaults to
json
which yields JSON parsing error :
While the straight forward work-around is to return
StringWrapper
object asjson
media-type:it would be great to support such case out of the box.
Thanks
The text was updated successfully, but these errors were encountered: