def log_post(self, url=None, credentials=None, do_verify_certificate=True):
if url is None:<EOL><INDENT>url = self.url<EOL><DEDENT>if credentials is None:<EOL><INDENT>credentials = self.credentials<EOL><DEDENT>if do_verify_certificate is None:<EOL><INDENT>do_verify_certificate = self.do_verify_certificate<EOL><DEDENT>if credentials and "<STR_LIT>" in credentials:<EOL><INDENT>headers = {"<STR_LIT:Content-Type>": "<STR_LIT:application/json>",'<STR_LIT>': '<STR_LIT>' % credentials["<STR_LIT>"]}<EOL><DEDENT>else:<EOL><INDENT>headers = {"<STR_LIT:Content-Type>": "<STR_LIT:application/json>"}<EOL><DEDENT>try:<EOL><INDENT>request = requests.post(url, headers=headers,data=self.store.get_json(), verify=do_verify_certificate)<EOL><DEDENT>except httplib.IncompleteRead as e:<EOL><INDENT>request = e.partial<EOL><DEDENT>
Write to a remote host via HTTP POST