Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 86bd531

Browse files
committed
Merge pull request #132 from jdecuyper/upgrade-cli
Make cli use the HTTP abstraction
2 parents d4d96a5 + bd091cc commit 86bd531

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hyper/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from pprint import pformat
1515
from textwrap import dedent
1616

17-
from hyper import HTTP20Connection
17+
from hyper import HTTPConnection
1818
from hyper import __version__
1919
from hyper.compat import is_py2, urlencode, urlsplit, write_to_stdout
2020

@@ -214,7 +214,7 @@ def get_content_type_and_charset(response):
214214

215215

216216
def request(args):
217-
conn = HTTP20Connection(args.url.host, args.url.port)
217+
conn = HTTPConnection(args.url.host, args.url.port)
218218
conn.request(args.method, args.url.path, args.body, args.headers)
219219
response = conn.get_response()
220220
log.debug('Response Headers:\n%s', pformat(response.headers))

test/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _get_value(obj, key):
8282
'specified host with url scheme https:// and path',
8383
])
8484
def test_cli_normal(monkeypatch, argv):
85-
monkeypatch.setattr('hyper.cli.HTTP20Connection', DummyConnection)
85+
monkeypatch.setattr('hyper.cli.HTTPConnection', DummyConnection)
8686
main(argv)
8787
assert True
8888

0 commit comments

Comments
 (0)