|
|
@@ -122,12 +122,10 @@ class HTTPClient(object): |
|
|
|
else: |
|
|
|
return self._req("POST", url, None, params) |
|
|
|
|
|
|
|
def put(self, url, data, params = None, binary = False): |
|
|
|
def put(self, url, data, params = None, |
|
|
|
content_type = "application/octet-stream"): |
|
|
|
"""Simple PUT (parameters in URL, data in body)""" |
|
|
|
if binary: |
|
|
|
h = { 'Content-type': 'application/octet-stream' } |
|
|
|
else: |
|
|
|
h = { 'Content-type': 'text/plain; charset=utf-8' } |
|
|
|
h = { 'Content-type': content_type } |
|
|
|
return self._req("PUT", url, query = params, body = data, headers = h) |
|
|
|
|
|
|
|
# Generator versions that return data one line at a time. |
|
|
|