parameters: (self,method,body)
docstring: POST request to DeepDetect server
docstring_summary: POST request to DeepDetect server
docstring_tokens: POST request to DeepDetect server
function: def post(self,method,body):
          """POST request to DeepDetect server"""
          
          r = None
          u = ""
          headers = {}
          try:
              u = self.__ddurl + method
              if self.__proto == self.__HTTP:
                  LOG("curl -X POST 'http://%s:%s%s' -d '%s'"%(self.__host,
                                                               self.__port,
                                                               method,
                                                               body))
                  c=httplib.HTTPConnection(self.__host,self.__port,timeout=DD_TIMEOUT)
              else:
                  LOG("curl -k -X POST 'https://%s:%s%s' -d '%s'"%(self.__host,
                                                                   self.__port,
                                                                   method,
                                                                   body))
                  c=httplib.HTTPSConnection(self.__host,self.__port, timeout=DD_TIMEOUT)
              c.request('POST',method,body,headers)
              r = c.getresponse()
              data = r.read()
              
          except:
              raise DDCommunicationError(u,"POST",headers,body,r)
  
          # LOG(data)
          try:
              return self.__return_format(data)
          except:
              import traceback
              print (traceback.format_exc())
  
              raise DDDataError(u,"POST",headers,body,data)
function_tokens: def post ( self , method , body ) : r = None u = "" headers = { } try : u = self . __ddurl + method if self . __proto == self . __HTTP : LOG ( "curl -X POST 'http://%s:%s%s' -d '%s'" % ( self . __host , self . __port , method , body ) ) c = httplib . HTTPConnection ( self . __host , self . __port , timeout = DD_TIMEOUT ) else : LOG ( "curl -k -X POST 'https://%s:%s%s' -d '%s'" % ( self . __host , self . __port , method , body ) ) c = httplib . HTTPSConnection ( self . __host , self . __port , timeout = DD_TIMEOUT ) c . request ( 'POST' , method , body , headers ) r = c . getresponse ( ) data = r . read ( ) except : raise DDCommunicationError ( u , "POST" , headers , body , r ) # LOG(data) try : return self . __return_format ( data ) except : import traceback print ( traceback . format_exc ( ) ) raise DDDataError ( u , "POST" , headers , body , data )