mirror of
https://github.com/httpie/cli.git
synced 2024-11-08 08:55:05 +01:00
TODOs
This commit is contained in:
parent
289e9b844e
commit
1681a4ddd0
@ -44,6 +44,7 @@ def get_requests_kwargs(args):
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto_json = args.data and not args.form
|
auto_json = args.data and not args.form
|
||||||
|
# FIXME: Accept is set to JSON with `http url @./file.txt`.
|
||||||
if args.json or auto_json:
|
if args.json or auto_json:
|
||||||
implicit_headers['Accept'] = 'application/json'
|
implicit_headers['Accept'] = 'application/json'
|
||||||
if args.json or (auto_json and args.data):
|
if args.json or (auto_json and args.data):
|
||||||
|
@ -793,6 +793,8 @@ 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(
|
||||||
'POST',
|
'POST',
|
||||||
httpbin('/post'),
|
httpbin('/post'),
|
||||||
@ -803,6 +805,8 @@ 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'),
|
||||||
|
Loading…
Reference in New Issue
Block a user