output does allow media-type to be specified...
Thanks for the observation.. True, I overlooked this parameter. Currently, it is only used for adding a meta tag if "xhtml" or "html" is chosen as output method. An example:
curl -i "http://localhost:8984/basex/jax-rx?wrap=no&query=<head/>&output=method=xhtml&output=include-content-type=yes"
<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head>
…but it would perfectly make sense to adopt this parameter as general media type. Looks as if this will lead to some more changes, as the JAX-RX Interface passes on all output (serialization) parameters to the underlying implementation (BaseX) without touching them – but, nevertheless, it defines the media type of the result, depending on the value of the "wrap" parameter.
The JAX-RX Interface is currently implemented by at least two implementations (BaseX and TreeTank), so I'll have to check first when the extension can be integrated; we'll keep you updated.
Christian