Skip to content

Commit 02feba3

Browse files
committed
undo content_type parameter change
1 parent 6d96dde commit 02feba3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

adafruit_requests.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def iter_content(self, chunk_size=1, decode_unicode=False):
146146

147147

148148
# pylint: disable=too-many-branches, too-many-statements, unused-argument, too-many-arguments, too-many-locals
149-
def request(method, url, data=None, json=None, headers=None, stream=False, timeout=1, content_type=None):
149+
def request(method, url, data=None, json=None, headers=None, stream=False, timeout=1):
150150
"""Perform an HTTP request to the given url which we will parse to determine
151151
whether to use SSL ('https://') or not. We can also send some provided 'data'
152152
or a json dictionary which we will stringify. 'headers' is optional HTTP headers
@@ -212,8 +212,6 @@ def request(method, url, data=None, json=None, headers=None, stream=False, timeo
212212
data = json_module.dumps(json)
213213
sock.send(b"Content-Type: application/json\r\n")
214214
if data:
215-
if content_type is not None:
216-
sock.send(b"Content-Type: %s\r\n" % content_type)
217215
sock.send(b"Content-Length: %d\r\n" % len(data))
218216
sock.send(b"\r\n")
219217
if data:

0 commit comments

Comments
 (0)