def extract_params(extract_body):
    """Extract request params."""
    uri = request.url
    http_method = request.method
    if extract_body:
        body = dict(request.forms)
    else:
        body = None
    headers = dict(request.headers)
    if 'wsgi.input' in headers:
        del headers['wsgi.input']
    if 'wsgi.errors' in headers:
        del headers['wsgi.errors']

    return uri, http_method, body, headers
dataset/ETHPy150Open codalab/codalab-cli/codalab/lib/server_util.py/extract_params/original