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

Commit b51870c

Browse files
committed
Changed to remove charset for application/json
1 parent 9a053cb commit b51870c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hyper/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def set_request_data(args):
170170
args.url.path += '?' + urlencode(params)
171171

172172
if body:
173-
content_type = 'application/json; charset=utf-8'
173+
content_type = 'application/json'
174174
headers.setdefault('content-type', content_type)
175175
args.body = json.dumps(body)
176176

test/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_get_content_type_and_charset(response, expected):
155155
KeyValue('data2', 'test2', '=', ''),
156156
]}
157157
),
158-
{'headers': {'content-type': 'application/json; charset=utf-8'},
158+
{'headers': {'content-type': 'application/json'},
159159
'method': 'POST',
160160
'body': json.dumps({'data1': 'test1', 'data2': 'test2'}),
161161
}

0 commit comments

Comments
 (0)