mirror of
https://github.com/httpie/cli.git
synced 2025-08-15 11:32:40 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
54c5c3d82b | |||
2a6514eb5d | |||
22c2cc6465 | |||
2265edf05e | |||
87774acf5c |
@ -1214,10 +1214,12 @@ Changelog
|
|||||||
*You can click a version name to see a diff with the previous one.*
|
*You can click a version name to see a diff with the previous one.*
|
||||||
|
|
||||||
* `0.8.0-dev`_
|
* `0.8.0-dev`_
|
||||||
* `0.7.0`_ (2013-09-24)
|
* `0.7.1`_ (2013-09-24)
|
||||||
* Added ``--ignore-stdin``.
|
* Added ``--ignore-stdin``.
|
||||||
* Added support for auth plugins.
|
* Added support for auth plugins.
|
||||||
|
* Improved ``--help`` output.
|
||||||
* Improved ``Content-Disposition`` parsing for ``--download`` mode.
|
* Improved ``Content-Disposition`` parsing for ``--download`` mode.
|
||||||
|
* Update to Requests 2.0.0
|
||||||
* `0.6.0`_ (2013-06-03)
|
* `0.6.0`_ (2013-06-03)
|
||||||
* XML data is now formatted.
|
* XML data is now formatted.
|
||||||
* ``--session`` and ``--session-read-only`` now also accept paths to
|
* ``--session`` and ``--session-read-only`` now also accept paths to
|
||||||
@ -1336,7 +1338,7 @@ Changelog
|
|||||||
.. _0.5.0: https://github.com/jkbr/httpie/compare/0.4.1...0.5.0
|
.. _0.5.0: https://github.com/jkbr/httpie/compare/0.4.1...0.5.0
|
||||||
.. _0.5.1: https://github.com/jkbr/httpie/compare/0.5.0...0.5.1
|
.. _0.5.1: https://github.com/jkbr/httpie/compare/0.5.0...0.5.1
|
||||||
.. _0.6.0: https://github.com/jkbr/httpie/compare/0.5.1...0.6.0
|
.. _0.6.0: https://github.com/jkbr/httpie/compare/0.5.1...0.6.0
|
||||||
.. _0.7.0: https://github.com/jkbr/httpie/compare/0.6.0...0.7.0
|
.. _0.7.1: https://github.com/jkbr/httpie/compare/0.6.0...0.7.1
|
||||||
.. _0.8.0-dev: https://github.com/jkbr/httpie/compare/0.7.0...master
|
.. _0.8.0-dev: https://github.com/jkbr/httpie/compare/0.7.1...master
|
||||||
.. _AUTHORS.rst: https://github.com/jkbr/httpie/blob/master/AUTHORS.rst
|
.. _AUTHORS.rst: https://github.com/jkbr/httpie/blob/master/AUTHORS.rst
|
||||||
.. _LICENSE: https://github.com/jkbr/httpie/blob/master/LICENSE
|
.. _LICENSE: https://github.com/jkbr/httpie/blob/master/LICENSE
|
||||||
|
@ -3,7 +3,7 @@ HTTPie - a CLI, cURL-like tool for humans.
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
__author__ = 'Jakub Roztocil'
|
__author__ = 'Jakub Roztocil'
|
||||||
__version__ = '0.7.0'
|
__version__ = '0.7.1'
|
||||||
__licence__ = 'BSD'
|
__licence__ = 'BSD'
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import sys
|
|||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import requests.auth
|
|
||||||
|
|
||||||
from . import sessions
|
from . import sessions
|
||||||
from . import __version__
|
from . import __version__
|
||||||
@ -15,12 +14,6 @@ JSON = 'application/json; charset=utf-8'
|
|||||||
DEFAULT_UA = 'HTTPie/%s' % __version__
|
DEFAULT_UA = 'HTTPie/%s' % __version__
|
||||||
|
|
||||||
|
|
||||||
class HTTPie(object):
|
|
||||||
|
|
||||||
def __init__(self, env, plugin_manager):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def get_response(args, config_dir):
|
def get_response(args, config_dir):
|
||||||
"""Send the request and return a `request.Response`."""
|
"""Send the request and return a `request.Response`."""
|
||||||
|
|
||||||
|
@ -88,16 +88,7 @@ class HTTPMessage(object):
|
|||||||
@property
|
@property
|
||||||
def content_type(self):
|
def content_type(self):
|
||||||
"""Return the message content type."""
|
"""Return the message content type."""
|
||||||
ct = self._orig.headers.get(
|
return self._orig.headers.get('Content-Type', '')
|
||||||
b'Content-Type',
|
|
||||||
self._orig.headers.get(
|
|
||||||
'Content-Type',
|
|
||||||
''
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if isinstance(ct, bytes):
|
|
||||||
ct = ct.decode()
|
|
||||||
return ct
|
|
||||||
|
|
||||||
|
|
||||||
class HTTPResponse(HTTPMessage):
|
class HTTPResponse(HTTPMessage):
|
||||||
|
2
setup.py
2
setup.py
@ -11,7 +11,7 @@ if sys.argv[-1] == 'test':
|
|||||||
|
|
||||||
|
|
||||||
requirements = [
|
requirements = [
|
||||||
'requests>=1.2.3',
|
'requests>=2.0.0',
|
||||||
'Pygments>=1.5'
|
'Pygments>=1.5'
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
|
@ -809,8 +809,6 @@ class RequestBodyFromFilePathTest(BaseTestCase):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
def test_request_body_from_file_by_path(self):
|
def test_request_body_from_file_by_path(self):
|
||||||
# FIXME: *sometimes* fails on py33, the content-type is form.
|
|
||||||
# https://github.com/jkbr/httpie/issues/140
|
|
||||||
r = http(
|
r = http(
|
||||||
'--verbose',
|
'--verbose',
|
||||||
'POST',
|
'POST',
|
||||||
@ -822,8 +820,6 @@ class RequestBodyFromFilePathTest(BaseTestCase):
|
|||||||
self.assertIn('"Content-Type": "text/plain"', r)
|
self.assertIn('"Content-Type": "text/plain"', r)
|
||||||
|
|
||||||
def test_request_body_from_file_by_path_with_explicit_content_type(self):
|
def test_request_body_from_file_by_path_with_explicit_content_type(self):
|
||||||
# FIXME: *sometimes* fails on py33, the content-type is form.
|
|
||||||
# https://github.com/jkbr/httpie/issues/140
|
|
||||||
r = http(
|
r = http(
|
||||||
'POST',
|
'POST',
|
||||||
httpbin('/post'),
|
httpbin('/post'),
|
||||||
|
Reference in New Issue
Block a user