Maybe should we take into account the "Accept" header in the request in order to stablish the output format? Or are we already doing that in another part in the code that I'm missing?