I`m trying to make those 2 requests in python:
Request 1:
curl -X POST -H \"Content-Type: application/json\" -d \'{ \"auth_token\": \"auth1\", \"w
why not use urllib2?
import urllib2
import urllib
vsphere_dict = dict(
server_name="servername",
api_version=apiVersion,
guest_count=guestCount,
guest_on=guestOnLen,
guest_off=guestOffLen,
)
# create request object, set url and post data
req = urllib2.Request(some_url, data=urllib.urlencode(vsphere_dict))
# set header
req.add_header('Content-Type', 'application/json')
# send request
response = urllib2.urlopen(req)
UPD:
sorry, by i not understand that is auth and widget. Maybe this is also POST data?
HTTP Error 500 - can mean that server received not all POST parameters.