Does Bottle support content negotiation? Sometimes it's the client that specifies to the server what format it wants back, for example the same URL can be used to return an HTML version of the resource, or JSON, or RDF, or XML. Can Bottle support this? More or less like this:
@route('/resource', accept-header='text/html'):
def html():
return resource as html
@route('/resource', accept-header='text/turtle'):
def turtle():
return resource as turtle file
@route('/resource', accept-header='application/xml'):
def xml():
return resource as xml file
Does Bottle support content negotiation? Sometimes it's the client that specifies to the server what format it wants back, for example the same URL can be used to return an HTML version of the resource, or JSON, or RDF, or XML. Can Bottle support this? More or less like this: