def upload_lifecycle(self, data):
path = '/api/1.0/lifecycle_event/'
url = self.url + path
payload = data
headers = {
'Authorization': 'Basic ' + base64.b64encode(self.username + ':' + self.password),
'Content-Type': 'application/x-www-form-urlencoded'
}
r = requests.put(url, data=payload, headers=headers, verify=False)
if DEBUG:
print '\t[+] Posting data: %s' % str(payload)
print '\t[*] Status code: %d' % r.status_code
print '\t[*] Response: %s' % str(r.text)
return r.json()
评论列表
文章目录