httpie / http-prompt

An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
https://http-prompt.com
MIT License
8.96k stars 326 forks source link

Refactor OpenAPI basePath support added by #140 #141

Closed eliangcs closed 6 years ago

eliangcs commented 6 years ago

PR #140 fixed the issue with the support for OpenAPI basePath, but the code can be improved. This PR moves spec parsing code out of cli.py and put it to Context constructor. Also adds two test cases in test_cli.py.

cc @nheisterkamp, you might want to take a look.