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):
(pycurl.FORM_FILE,
formfile[1])))])
elif filename is not None:
- with open(filename, 'r') as stream:
+ with open(filename, 'rb') as stream:
postdata=stream.read()
curl_cmd.setopt(pycurl.POSTFIELDS, postdata)