I would like to make following curl request with pycurl:
curl -v \
-H Accept:application/json \
-F "model={
name: 'zxy',
targets: [ 'abc']
}" \
-F "deployment=@/deployments/MyApp.ear" \
-X POST https://abc.cde
How to put to the postfield things that follow -F options?
I have currently:
c = pycurl.Curl()
c.setopt(pycurl.URL, "https://abc.cde")
c.setopt(pycurl.HTTPHEADER, ['Accept:application/json'])
c.setopt(pycurl.POST, 1)
# set postfield somehow