Open
Description
If you have both of those they get treated differently
op a(@header contentType: "application/json;charset=utf-8", @body body: bytes): void;
op b(@header contentType: "application/json", @body body: bytes): void;
in the first case it see is as a binary payload(that should be json)
in the 2nd is see it as a json base64 encoded string of the value passed
There is a few things that are established that result in this behavior
- default content type is application/json
bytes
in a json object is a base64 encoded string of the bytes- we only do this special treatment if content type is exactly
application/json
Maybe we need to parse the content type to figure out the real media type without the attributes
However it is also weird that you can't just say this is a json file without defining the structure of it