def request_check(r):
    """return a valid json response with meta data from request"""
    request = {'status': 'ok'}
    if r.args.get('data'):
        request['data'] = r.args.get('data')
    if r.args.get('method'):
        request['method'] = r.args.get('method')
    if r.args.get('resource'):
        request['resource'] = r.args.get('resource')
    return request
