add get_json method to request handler

steal from flask