Steps to reproduce:
or with cUrl
In both of the above cases http service selects the first available representation (aka HTML) based on "*/*" instead of more specific JSON.
I think one possible fix is to by default assign higher weight to more specific mime types when Accept header is parsed in org.apache.jackrabbit.oak.http.MediaRange.parse
For example replacing return statement in above method with the following fixed this bug in my testing: