def get_dict(*keys, **extras):
_keys = ('<STR_LIT:url>', '<STR_LIT:args>', '<STR_LIT>', '<STR_LIT:data>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>assert all(map(_keys.__contains__, keys))<EOL>data = request.data<EOL>form = semiflatten(request.form)<EOL>try:<EOL><INDENT>_json = json.loads(data.decode('<STR_LIT:utf-8>'))<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>_json = None<EOL><DEDENT>d = dict(<EOL>url=get_url(request),<EOL>args=semiflatten(request.args),<EOL>form=form,<EOL>data=json_safe(data),<EOL>origin=request.headers.get('<STR_LIT>', request.remote_addr),<EOL>headers=get_headers(),<EOL>files=get_files(),<EOL>json=_json,<EOL>method=request.method,<EOL>)<EOL>out_d = dict()<EOL>for key in keys:<EOL><INDENT>out_d[key] = d.get(key)<EOL><DEDENT>out_d.update(extras)<EOL>return out_d<EOL>
Returns request dict of given keys.