From 8b773a4fed7fa58be984d55511f8e9247cfa4202 Mon Sep 17 00:00:00 2001 From: Alessio Izzo Date: Sun, 7 Apr 2019 13:36:34 +0200 Subject: [PATCH] [remove] remove invalid field in docete Remove 'Connection': 'close' field in 'headers' --- requests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/__init__.py b/requests/__init__.py index 0c2167fb..40108e7c 100644 --- a/requests/__init__.py +++ b/requests/__init__.py @@ -24,7 +24,7 @@ Basic GET usage: >>> payload = dict(key1='value1', key2='value2') >>> r = requests.post('https://httpbin.org/post', data=payload) >>> r.json() - {'args': {}, 'data': '', 'files': {}, 'form': {'key1': 'value1', 'key2': 'value2'}, 'headers': {'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Connection': 'close', 'Content-Length': '23', 'Content-Type': 'application/x-www-form-urlencoded', 'Host': 'httpbin.org', 'User-Agent': 'python-requests/...'}, 'json': None, 'origin': '...', 'url': 'https://httpbin.org/post'} + {'args': {}, 'data': '', 'files': {}, 'form': {'key1': 'value1', 'key2': 'value2'}, 'headers': {'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Content-Length': '23', 'Content-Type': 'application/x-www-form-urlencoded', 'Host': 'httpbin.org', 'User-Agent': 'python-requests/...'}, 'json': None, 'origin': '...', 'url': 'https://httpbin.org/post'} The other HTTP methods are supported - see `requests.api`. Full documentation is at .