Commits

Jeffrey Goettsch committed 1708c66

nma.Client now logs HTTP GET and POST operations.

Comments (0)

Files changed (1)

pushnotify/nma.py

 
     def _get(self, url):
 
+        self.logger.debug('getting url: {0}'.format(url))
+
         request = urllib2.Request(url)
         response_stream = self._browser.open(request)
         response = response_stream.read()
 
+        self.logger.info('received response from _get: {0}'.format(response))
+
         return response
 
     def _parse_response(self, xmlresp, verify=False):
 
     def _post(self, url, data):
 
+        self.logger.debug('posting to url: {0}'.format(url))
+        self.logger.debug('posting data: {0}'.format(data))
+
         request = urllib2.Request(url, data)
         response_stream = self._browser.open(request)
         response = response_stream.read()
 
+        self.logger.info('received response from _post: {0}'.format(response))
+
         return response
 
     def _raise_exception(self):