only one so far... :-)
%dw 2.0
output application/json
import * from dw::core::Binaries
var mime = 'application/json'
var og = {foo:'bar'}
var str = toBase64(write(og,mime) as Binary)
var bin = str as Binary {base:'64'}
---
{
str:str,
bin:bin,
back:read(bin, mime)
}
- when mocking
anypoint-mq:publish
returned payload, setmediaType
toapplication/octet-stream
- works in this playground