def sign_http_args(method, url, headers, body=''):
    p = urlparse(url)
    kwargs = {'path': p.path, 'host': p.netloc, 'headers': headers, 'method': method}
    if body:
        kwargs['body'] = body
    query_params = compact(parse_qs(p.query))
    kwargs['query_params'] = query_params
    return kwargs
def sign_http_args(method, url, headers, body=):
    p = urlparse(url)
    kwargs = {'path': p.path, 'host': p.netloc, 'headers': headers, 'method': method}
    if body:
        kwargs['body'] = body
    query_params = compact(parse_qs(p.query))
    kwargs['query_params'] = query_params
    return kwargs