After https://issues.jboss.org/browse/AGPUSH-229, this can be simplified to:

`data: JSON.stringify( metadata )`