-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
FeatureThis is a feature request, not a bug. Open for discussion.This is a feature request, not a bug. Open for discussion.
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FeatureThis is a feature request, not a bug. Open for discussion.This is a feature request, not a bug. Open for discussion.