X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fhttp.py;h=4debf0d97cd804157d14a845361135accc994adf;hb=da765d5ec750a9de0e4123d60ff211ca86a2ad61;hp=8e80ba950e514b84728d6b700d87c3f77987b958;hpb=f157128052e59df5c37489926f7d5755714c3cbf;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/http.py b/osmclient/sol005/http.py index 8e80ba9..4debf0d 100644 --- a/osmclient/sol005/http.py +++ b/osmclient/sol005/http.py @@ -50,7 +50,7 @@ class Http(http.Http): curl_cmd.close() # TODO 202 accepted should be returned somehow if data.getvalue(): - return http_code, json.loads(data.getvalue().decode()) + return http_code, data.getvalue().decode() else: return http_code, None @@ -60,11 +60,10 @@ class Http(http.Http): data = BytesIO() curl_cmd = self._get_curl_cmd(endpoint) if put_method: - curl_cmd.setopt(pycurl.PUT, 1) + curl_cmd.setopt(pycurl.CUSTOMREQUEST, "PUT") elif patch_method: curl_cmd.setopt(pycurl.CUSTOMREQUEST, "PATCH") - else: - curl_cmd.setopt(pycurl.POST, 1) + curl_cmd.setopt(pycurl.POST, 1) curl_cmd.setopt(pycurl.WRITEFUNCTION, data.write) if postfields_dict is not None: