1
0
mirror of https://github.com/httpie/cli.git synced 2024-11-28 08:38:44 +02:00

Added omitted query string data to request headers.

This commit is contained in:
Cemal Eker 2012-07-14 03:37:24 +03:00
parent cd2ca41f48
commit cb7ead04e2

View File

@ -30,9 +30,10 @@ def from_request(request):
body = request.__class__._encode_params(body)
return HTTPMessage(
line='{method} {path} HTTP/1.1'.format(
line='{method} {path}{query} HTTP/1.1'.format(
method=request.method,
path=url.path or '/'),
path=url.path or '/',
query='' if url.query is '' else '?' + url.query),
headers='\n'.join(str('%s: %s') % (name, value)
for name, value
in request_headers.items()),