X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fhttp.py;h=7988d89a489b1365397265f8ba86ecb54b19114e;hb=bd1e05f5d5f89dce132a98853d3035f9dfc8d168;hp=5311ca8d1e5b6cda544e662861c89250fd631b0f;hpb=714ae5cdd921c3d69ff35575febb96e7ff0fac27;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/http.py b/osmclient/sol005/http.py index 5311ca8..7988d89 100644 --- a/osmclient/sol005/http.py +++ b/osmclient/sol005/http.py @@ -17,9 +17,7 @@ from io import BytesIO import pycurl import json -import yaml from osmclient.common import http -from osmclient.common.exceptions import ClientException class Http(http.Http): @@ -60,11 +58,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: