python bottle deciding on return mimetype
The Request Mime-type(or content-type) is the type of the content being sent to the server - it does not mean this is the same type that should be returned by the server.
The client should know what the server Response type is going to be, and not otherwise - the server should not "guess" what response the client wants.
I am using bottle for a POC restful service project. would someone kindly let me know what is the best way to decide if the caller wants me to send the response in JSON, XML, or HTML? I have seen some examples of this using request.mimetypes.best_match, but that needs me to import flask. is there a way to do this in bottle itself?
Thanks a lot,
Reza